Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
3da186b6
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3da186b6
编写于
5月 29, 2018
作者:
E
Eduard-Mihai Burtescu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rustc: use syntactic (instead of visibility) source info where appropriate.
上级
0895590c
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
32 addition
and
30 deletion
+32
-30
src/librustc/mir/visit.rs
src/librustc/mir/visit.rs
+1
-1
src/librustc_mir/transform/check_unsafety.rs
src/librustc_mir/transform/check_unsafety.rs
+1
-1
src/librustc_mir/util/pretty.rs
src/librustc_mir/util/pretty.rs
+2
-2
src/test/mir-opt/box_expr.rs
src/test/mir-opt/box_expr.rs
+2
-1
src/test/mir-opt/end_region_1.rs
src/test/mir-opt/end_region_1.rs
+2
-2
src/test/mir-opt/end_region_2.rs
src/test/mir-opt/end_region_2.rs
+2
-2
src/test/mir-opt/end_region_3.rs
src/test/mir-opt/end_region_3.rs
+2
-2
src/test/mir-opt/end_region_4.rs
src/test/mir-opt/end_region_4.rs
+4
-4
src/test/mir-opt/end_region_8.rs
src/test/mir-opt/end_region_8.rs
+2
-2
src/test/mir-opt/end_region_9.rs
src/test/mir-opt/end_region_9.rs
+2
-2
src/test/mir-opt/end_region_cyclic.rs
src/test/mir-opt/end_region_cyclic.rs
+1
-1
src/test/mir-opt/issue-41110.rs
src/test/mir-opt/issue-41110.rs
+4
-3
src/test/mir-opt/nll/reborrow-basic.rs
src/test/mir-opt/nll/reborrow-basic.rs
+2
-2
src/test/mir-opt/nll/region-subtyping-basic.rs
src/test/mir-opt/nll/region-subtyping-basic.rs
+2
-2
src/test/mir-opt/packed-struct-drop-aligned.rs
src/test/mir-opt/packed-struct-drop-aligned.rs
+1
-1
src/test/mir-opt/validate_3.rs
src/test/mir-opt/validate_3.rs
+2
-2
未找到文件。
src/librustc/mir/visit.rs
浏览文件 @
3da186b6
...
...
@@ -722,7 +722,7 @@ fn super_local_decl(&mut self,
self
.visit_ty
(
ty
,
TyContext
::
LocalDecl
{
local
,
source_info
:
*
visibility
_source_info
,
source_info
:
*
syntactic
_source_info
,
});
self
.visit_source_info
(
syntactic_source_info
);
self
.visit_source_info
(
visibility_source_info
);
...
...
src/librustc_mir/transform/check_unsafety.rs
浏览文件 @
3da186b6
...
...
@@ -166,7 +166,7 @@ fn visit_place(&mut self,
// Internal locals are used in the `move_val_init` desugaring.
// We want to check unsafety against the source info of the
// desugaring, rather than the source info of the RHS.
self
.source_info
=
self
.mir.local_decls
[
local
]
.
visibility
_source_info
;
self
.source_info
=
self
.mir.local_decls
[
local
]
.
syntactic
_source_info
;
}
}
let
base_ty
=
base
.ty
(
self
.mir
,
self
.tcx
)
.to_ty
(
self
.tcx
);
...
...
src/librustc_mir/util/pretty.rs
浏览文件 @
3da186b6
...
...
@@ -467,8 +467,8 @@ fn write_scope_tree(
// User variable types (including the user's name in a comment).
for
local
in
mir
.vars_iter
()
{
let
var
=
&
mir
.local_decls
[
local
];
let
(
name
,
source_info
)
=
if
var
.
visibility
_source_info.scope
==
child
{
(
var
.name
.unwrap
(),
var
.
visibility
_source_info
)
let
(
name
,
source_info
)
=
if
var
.
syntactic
_source_info.scope
==
child
{
(
var
.name
.unwrap
(),
var
.
syntactic
_source_info
)
}
else
{
// Not a variable or not declared in this scope.
continue
;
...
...
src/test/mir-opt/box_expr.rs
浏览文件 @
3da186b6
...
...
@@ -33,9 +33,10 @@ fn drop(&mut self) {
// START rustc.main.ElaborateDrops.before.mir
// let mut _0: ();
// scope 1 {
// }
// scope 2 {
// let _1: std::boxed::Box<S>;
// }
// ...
// let mut _2: std::boxed::Box<S>;
// let mut _3: ();
// let mut _4: std::boxed::Box<S>;
...
...
src/test/mir-opt/end_region_1.rs
浏览文件 @
3da186b6
...
...
@@ -22,10 +22,10 @@ fn main() {
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: i32;
// ...
// let _2: &'10_1rs i32;
// ...
// let _1: i32;
// ...
// bb0: {
// StorageLive(_1);
// _1 = const 3i32;
...
...
src/test/mir-opt/end_region_2.rs
浏览文件 @
3da186b6
...
...
@@ -27,11 +27,11 @@ fn main() {
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _
2:
bool;
// let _
7: &'23_3rs
bool;
// ...
// let _3: &'23_1rs bool;
// ...
// let _
7: &'23_3rs
bool;
// let _
2:
bool;
// ...
// let mut _4: ();
// let mut _5: bool;
...
...
src/test/mir-opt/end_region_3.rs
浏览文件 @
3da186b6
...
...
@@ -28,11 +28,11 @@ fn main() {
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let
mut _1:
bool;
// let
_7: &'26_3rs
bool;
// ...
// let _3: &'26_1rs bool;
// ...
// let
_7: &'26_3rs
bool;
// let
mut _1:
bool;
// ...
// let mut _2: ();
// let mut _4: ();
...
...
src/test/mir-opt/end_region_4.rs
浏览文件 @
3da186b6
...
...
@@ -32,13 +32,13 @@ fn foo(i: i32) {
// START rustc.main.SimplifyCfg-qualify-consts.after.mir
// let mut _0: ();
// ...
// let _1: D;
// ...
// let _2: i32;
// let _6: &'26_4rs i32;
// ...
// let _3: &'26_2rs i32;
// ...
// let _6: &'26_4rs i32;
// let _2: i32;
// ...
// let _1: D;
// ...
// let mut _4: ();
// let mut _5: i32;
...
...
src/test/mir-opt/end_region_8.rs
浏览文件 @
3da186b6
...
...
@@ -31,10 +31,10 @@ fn foo<F>(f: F) where F: FnOnce() -> i32 {
// fn main() -> () {
// let mut _0: ();
// ...
// let _1: D;
// ...
// let _2: &'21_1rs D;
// ...
// let _1: D;
// ...
// let mut _3: ();
// let mut _4: [closure@NodeId(22) r:&'19s D];
// let mut _5: &'21_1rs D;
...
...
src/test/mir-opt/end_region_9.rs
浏览文件 @
3da186b6
...
...
@@ -41,11 +41,11 @@ fn main() {
// fn main() -> () {
// let mut _0: ();
// ...
// let mut _
1: bool
;
// let mut _
4: &'33_0rs i32
;
// ...
// let _2: i32;
// ...
// let mut _
4: &'33_0rs i32
;
// let mut _
1: bool
;
// ...
// let mut _3: ();
// let mut _5: !;
...
...
src/test/mir-opt/end_region_cyclic.rs
浏览文件 @
3da186b6
...
...
@@ -43,9 +43,9 @@ fn query() -> bool { true }
// fn main() -> (){
// let mut _0: ();
// scope 1 {
// let _2: S<'36_0rs>;
// }
// scope 2 {
// let _2: S<'36_0rs>;
// }
// let mut _1: ();
// let mut _3: std::cell::Cell<std::option::Option<&'36_0rs S<'36_0rs>>>;
...
...
src/test/mir-opt/issue-41110.rs
浏览文件 @
3da186b6
...
...
@@ -40,9 +40,10 @@ fn other(self, s: Self) {}
// START rustc.main.ElaborateDrops.after.mir
// let mut _0: ();
// scope 1 {
// }
// scope 2 {
// let _1: ();
// }
// ...
// let mut _2: S;
// let mut _3: S;
// let mut _4: S;
...
...
@@ -52,10 +53,10 @@ fn other(self, s: Self) {}
// START rustc.test.ElaborateDrops.after.mir
// let mut _0: ();
// ...
// let _1: S;
// ...
// let mut _2: S;
// ...
// let _1: S;
// ...
// let mut _3: ();
// let mut _4: S;
// let mut _5: S;
...
...
src/test/mir-opt/nll/reborrow-basic.rs
浏览文件 @
3da186b6
...
...
@@ -32,7 +32,7 @@ fn main() {
// ...
// | '_#9r | {bb0[10], bb0[14..=17]}
// ...
// let _2: &'_#7r mut i32;
// ...
// let _4: &'_#9r mut i32;
// ...
// let _2: &'_#7r mut i32;
// END rustc.main.nll.0.mir
src/test/mir-opt/nll/region-subtyping-basic.rs
浏览文件 @
3da186b6
...
...
@@ -37,10 +37,10 @@ fn main() {
// | '_#4r | {bb2[5..=6], bb3[0..=1]}
// END rustc.main.nll.0.mir
// START rustc.main.nll.0.mir
// let _2: &'_#3r usize;
// ...
// let _6: &'_#4r usize;
// ...
// let _2: &'_#3r usize;
// ...
// _2 = &'_#2r _1[_3];
// ...
// _7 = _2;
...
...
src/test/mir-opt/packed-struct-drop-aligned.rs
浏览文件 @
3da186b6
...
...
@@ -29,9 +29,9 @@ fn drop(&mut self) {}
// fn main() -> () {
// let mut _0: ();
// scope 1 {
// let mut _1: Packed;
// }
// scope 2 {
// let mut _1: Packed;
// }
// let mut _2: Aligned;
// let mut _3: Droppy;
...
...
src/test/mir-opt/validate_3.rs
浏览文件 @
3da186b6
...
...
@@ -32,14 +32,14 @@ fn _unused2(x: *const i32) -> i32 { unsafe { *x }}
// fn main() -> (){
// let mut _0: ();
// scope 1 {
// let _1: Test;
// scope 3 {
// let _2: &ReErased Test;
// }
// scope 4 {
// let _2: &ReErased Test;
// }
// }
// scope 2 {
// let _1: Test;
// }
// let mut _3: ();
// let mut _4: &ReErased i32;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录