diff options
| author | bors <bors@rust-lang.org> | 2023-03-12 23:27:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-12 23:27:52 +0000 |
| commit | b05bb2900825e4d063ebf3f0f11afb08baed3bc6 (patch) | |
| tree | 7eab2ab2a52abf592a590cd143e93faae37b5a6e /tests/ui | |
| parent | 7b4f48927dce585f747a58083b45ab62b9d73a53 (diff) | |
| parent | 8179b2e5f8ab3524aa7860d8b34897949dde4b65 (diff) | |
| download | rust-b05bb2900825e4d063ebf3f0f11afb08baed3bc6.tar.gz rust-b05bb2900825e4d063ebf3f0f11afb08baed3bc6.zip | |
Auto merge of #108872 - cjgillot:simp-const-prop, r=oli-obk
Strengthen state tracking in const-prop Some/many of the changes are replicated between both the const-prop lint and the const-prop optimization. Behaviour changes: - const-prop opt does not give a span to propagated values. This was useless as that span's primary purpose is to diagnose evaluation failure in codegen. - we remove the `OnlyPropagateInto` mode. It was only used for function arguments, which are better modeled by a write before entry. - the tracking of assignments and discriminants make clearer that we do nothing in `NoPropagation` mode or on indirect places.
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/consts/const-err-late.stderr | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/ui/consts/const-err-late.stderr b/tests/ui/consts/const-err-late.stderr index cb0cab2444b..192b9ba204b 100644 --- a/tests/ui/consts/const-err-late.stderr +++ b/tests/ui/consts/const-err-late.stderr @@ -10,12 +10,6 @@ note: erroneous constant used LL | black_box((S::<i32>::FOO, S::<u32>::FOO)); | ^^^^^^^^^^^^^ -note: erroneous constant used - --> $DIR/const-err-late.rs:19:16 - | -LL | black_box((S::<i32>::FOO, S::<u32>::FOO)); - | ^^^^^^^^^^^^^ - error[E0080]: evaluation of `S::<u32>::FOO` failed --> $DIR/const-err-late.rs:13:21 | @@ -34,6 +28,12 @@ note: erroneous constant used LL | black_box((S::<i32>::FOO, S::<u32>::FOO)); | ^^^^^^^^^^^^^ +note: erroneous constant used + --> $DIR/const-err-late.rs:19:16 + | +LL | black_box((S::<i32>::FOO, S::<u32>::FOO)); + | ^^^^^^^^^^^^^ + error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0080`. |
