Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
8e11199a
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,发现更多精彩内容 >>
提交
8e11199a
编写于
8月 15, 2021
作者:
E
Erik Desjardins
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk"
This reverts commit
8007b506
, reversing changes made to
e55c13e1
.
上级
2a6fb9a4
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
56 addition
and
21 deletion
+56
-21
compiler/rustc_mir/src/transform/remove_zsts.rs
compiler/rustc_mir/src/transform/remove_zsts.rs
+3
-0
src/test/incremental/hashes/trait_impls.rs
src/test/incremental/hashes/trait_impls.rs
+1
-1
src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
...nst_prop/control_flow_simplification.hello.ConstProp.diff
+1
-1
src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
...p/control_flow_simplification.hello.PreCodegen.before.mir
+1
-0
src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
...nneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
+1
-0
src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
...t/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
+1
-0
src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
...ir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
+1
-0
src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
..._unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
+1
-0
src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
...ir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
+34
-15
src/test/run-make/const_fn_mir/dump.mir
src/test/run-make/const_fn_mir/dump.mir
+1
-0
src/test/ui/consts/const-eval/panic-assoc-never-type.rs
src/test/ui/consts/const-eval/panic-assoc-never-type.rs
+1
-0
src/test/ui/consts/const-eval/panic-assoc-never-type.stderr
src/test/ui/consts/const-eval/panic-assoc-never-type.stderr
+7
-1
src/test/ui/recursion/issue-26548-recursion-via-normalize.stderr
...t/ui/recursion/issue-26548-recursion-via-normalize.stderr
+3
-3
未找到文件。
compiler/rustc_mir/src/transform/remove_zsts.rs
浏览文件 @
8e11199a
...
...
@@ -9,6 +9,9 @@
impl
<
'tcx
>
MirPass
<
'tcx
>
for
RemoveZsts
{
fn
run_pass
(
&
self
,
tcx
:
TyCtxt
<
'tcx
>
,
body
:
&
mut
Body
<
'tcx
>
)
{
if
tcx
.sess
.mir_opt_level
()
<
3
{
return
;
}
let
param_env
=
tcx
.param_env
(
body
.source
.def_id
());
let
(
basic_blocks
,
local_decls
)
=
body
.basic_blocks_and_local_decls_mut
();
for
block
in
basic_blocks
.iter_mut
()
{
...
...
src/test/incremental/hashes/trait_impls.rs
浏览文件 @
8e11199a
...
...
@@ -62,7 +62,7 @@ fn method_name() { }
#[rustc_clean(cfg=
"cfail2"
)]
#[rustc_clean(cfg=
"cfail3"
)]
impl
ChangeMethodBodyTrait
for
Foo
{
#[rustc_clean(except=
"hir_owner_nodes,typeck"
,
cfg=
"cfail2"
)]
#[rustc_clean(except=
"hir_owner_nodes,typeck
,optimized_mir
"
,
cfg=
"cfail2"
)]
#[rustc_clean(cfg=
"cfail3"
)]
fn
method_name
()
{
()
...
...
src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
浏览文件 @
8e11199a
...
...
@@ -29,7 +29,7 @@
}
bb2: {
nop;
// scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
_0 = const ();
// scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:14:5: 14:6
return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
}
...
...
src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
浏览文件 @
8e11199a
...
...
@@ -4,6 +4,7 @@ fn hello() -> () {
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
bb0: {
_0 = const (); // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
}
}
src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
浏览文件 @
8e11199a
...
...
@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
nop; // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
}
...
...
src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
浏览文件 @
8e11199a
...
...
@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
_3 = move _1; // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
nop; // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
}
...
...
src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
浏览文件 @
8e11199a
...
...
@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
- nop; // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
- drop(_3) -> bb1; // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
- }
-
...
...
src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
浏览文件 @
8e11199a
...
...
@@ -14,6 +14,7 @@
StorageLive(_2); // scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
StorageLive(_3); // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
_3 = _1; // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
- nop; // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
- drop(_3) -> bb1; // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
- }
-
...
...
src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
浏览文件 @
8e11199a
...
...
@@ -9,8 +9,8 @@
let mut _4: isize; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
let mut _5: isize; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
let _6: u8; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
-
let mut _7: bool; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
-
let mut _8: u8; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
let mut _7: bool; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
let mut _8: u8; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
scope 1 {
debug a => _6; // in scope 1 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
}
...
...
@@ -26,32 +26,51 @@
StorageDead(_3); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69
StorageDead(_2); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:68: 4:69
_5 = discriminant((_1.0: std::option::Option<u8>)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
switchInt(move _5) -> [1_isize: bb
1, otherwise: bb3
]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
switchInt(move _5) -> [1_isize: bb
2, otherwise: bb1
]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:13: 4:20
}
bb1: {
_
4 = discriminant((_1.1: std::option::Option<T>)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:2
6
switchInt(move _4) -> [0_isize: bb2, otherwise: bb3]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:2
6
_
0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:6: 8:
6
goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:
6
}
bb2: {
_4 = discriminant((_1.1: std::option::Option<T>)); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
switchInt(move _4) -> [0_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:22: 4:26
}
bb3: {
StorageLive(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
_6 = (((_1.0: std::option::Option<u8>) as Some).0: u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:18: 4:19
- StorageLive(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
- StorageLive(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
- _8 = _6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
- _7 = Gt(move _8, const 42_u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
- StorageDead(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:19: 5:20
- StorageDead(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:7:9: 7:10
goto -> bb3; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6
StorageLive(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
StorageLive(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
_8 = _6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:13
_7 = Gt(move _8, const 42_u8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:12: 5:20
StorageDead(_8); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:19: 5:20
switchInt(move _7) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
}
bb3: {
bb4: {
_0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
goto -> bb6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
}
bb5: {
_0 = const (); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
goto -> bb6; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
}
bb6: {
StorageDead(_7); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:7:9: 7:10
goto -> bb7; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6
}
bb7: {
StorageDead(_6); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:5: 8:6
drop(_1) -> bb
4
; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2
drop(_1) -> bb
8
; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2
}
bb
4
: {
bb
8
: {
StorageDead(_1); // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:1: 9:2
return; // scope 0 at $DIR/simplify-locals-fixedpoint.rs:9:2: 9:2
}
...
...
src/test/run-make/const_fn_mir/dump.mir
浏览文件 @
8e11199a
...
...
@@ -12,6 +12,7 @@ fn main() -> () {
}
bb1: {
_0 = const (); // scope 0 at main.rs:8:11: 10:2
return; // scope 0 at main.rs:10:2: 10:2
}
}
...
...
src/test/ui/consts/const-eval/panic-assoc-never-type.rs
浏览文件 @
8e11199a
...
...
@@ -14,4 +14,5 @@ impl PrintName {
fn
main
()
{
let
_
=
PrintName
::
VOID
;
//~^ ERROR erroneous constant used
}
src/test/ui/consts/const-eval/panic-assoc-never-type.stderr
浏览文件 @
8e11199a
...
...
@@ -6,6 +6,12 @@ LL | const VOID: ! = panic!();
|
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
error[E0080]: erroneous constant used
--> $DIR/panic-assoc-never-type.rs:16:13
|
LL | let _ = PrintName::VOID;
| ^^^^^^^^^^^^^^^ referenced constant has errors
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0080`.
src/test/ui/recursion/issue-26548-recursion-via-normalize.stderr
浏览文件 @
8e11199a
error[E0391]: cycle detected when computing layout of `
std::option::Option<S>
`
error[E0391]: cycle detected when computing layout of `
S
`
|
= note: ...which requires computing layout of `
S
`...
= note: ...which again requires computing layout of `
std::option::Option<S>
`, completing the cycle
= note: ...which requires computing layout of `
std::option::Option<S>
`...
= note: ...which again requires computing layout of `
S
`, completing the cycle
note: cycle used when optimizing MIR for `main`
--> $DIR/issue-26548-recursion-via-normalize.rs:15:1
|
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录