diff options
| author | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-30 14:26:40 +0000 |
|---|---|---|
| committer | Oli Scherer <github35764891676564198441@oli-obk.de> | 2021-03-31 10:40:42 +0000 |
| commit | dbacfbc3681622d634233bcf36504ec898f91818 (patch) | |
| tree | 5320c2401ab3f6f60766e029add981d33cb221a0 /src | |
| parent | c7c39ce6d07e4d33dc25e07c43f0139c0634b7eb (diff) | |
| download | rust-dbacfbc3681622d634233bcf36504ec898f91818.tar.gz rust-dbacfbc3681622d634233bcf36504ec898f91818.zip | |
Add a new normalization query just for mir constants
Diffstat (limited to 'src')
6 files changed, 14 insertions, 22 deletions
diff --git a/src/test/ui/associated-consts/defaults-cyclic-fail.rs b/src/test/ui/associated-consts/defaults-cyclic-fail.rs index 9fb1bbebc96..d9ff0b09c28 100644 --- a/src/test/ui/associated-consts/defaults-cyclic-fail.rs +++ b/src/test/ui/associated-consts/defaults-cyclic-fail.rs @@ -1,5 +1,5 @@ // build-fail -//~^ ERROR cycle detected when normalizing `<() as Tr>::A` +//~^ ERROR cycle detected when normalizing // Cyclic assoc. const defaults don't error unless *used* trait Tr { diff --git a/src/test/ui/consts/const-eval/conditional_array_execution.rs b/src/test/ui/consts/const-eval/conditional_array_execution.rs index 9b99a685b63..bd517e568ea 100644 --- a/src/test/ui/consts/const-eval/conditional_array_execution.rs +++ b/src/test/ui/consts/const-eval/conditional_array_execution.rs @@ -10,7 +10,7 @@ const FOO: u32 = [X - Y, Y - X][(X < Y) as usize]; fn main() { println!("{}", FOO); - //~^ ERROR + //~^ ERROR evaluation of constant value failed //~| WARN erroneous constant used [const_err] //~| WARN this was previously accepted by the compiler but is being phased out } diff --git a/src/test/ui/consts/const-eval/const-eval-query-stack.rs b/src/test/ui/consts/const-eval/const-eval-query-stack.rs index 8c3959cc11a..017d49d8b26 100644 --- a/src/test/ui/consts/const-eval/const-eval-query-stack.rs +++ b/src/test/ui/consts/const-eval/const-eval-query-stack.rs @@ -1,5 +1,4 @@ -//~ERROR constructed but no error reported -// compile-flags: -Ztreat-err-as-bug=2 +// compile-flags: -Ztreat-err-as-bug=1 // build-fail // failure-status: 101 // rustc-env:RUST_BACKTRACE=1 diff --git a/src/test/ui/consts/const-eval/const-eval-query-stack.stderr b/src/test/ui/consts/const-eval/const-eval-query-stack.stderr index 6a205ce9787..4f16cd96a96 100644 --- a/src/test/ui/consts/const-eval/const-eval-query-stack.stderr +++ b/src/test/ui/consts/const-eval/const-eval-query-stack.stderr @@ -1,5 +1,5 @@ warning: any use of this value will cause an error - --> $DIR/const-eval-query-stack.rs:20:16 + --> $DIR/const-eval-query-stack.rs:19:16 | LL | const X: i32 = 1 / 0; | ---------------^^^^^- @@ -7,7 +7,7 @@ LL | const X: i32 = 1 / 0; | attempt to divide `1_i32` by zero | note: the lint level is defined here - --> $DIR/const-eval-query-stack.rs:19:8 + --> $DIR/const-eval-query-stack.rs:18:8 | LL | #[warn(const_err)] | ^^^^^^^^^ @@ -15,12 +15,16 @@ LL | #[warn(const_err)] = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800> error[E0080]: evaluation of constant value failed - --> $DIR/const-eval-query-stack.rs:24:28 + --> $DIR/const-eval-query-stack.rs:23:28 | LL | let x: &'static i32 = &X; | ^ referenced constant has errors + query stack during panic: -#0 [normalize_generic_arg_after_erasing_regions] normalizing `main::promoted[1]` -#1 [optimized_mir] optimizing MIR for `main` -#2 [collect_and_partition_mono_items] collect_and_partition_mono_items +#0 [eval_to_allocation_raw] const-evaluating + checking `main::promoted[1]` +#1 [eval_to_const_value_raw] simplifying constant for the type system `main::promoted[1]` +#2 [eval_to_const_value_raw] simplifying constant for the type system `main::promoted[1]` +#3 [normalize_mir_const_after_erasing_regions] normalizing `main::promoted[1]` +#4 [optimized_mir] optimizing MIR for `main` +#5 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack diff --git a/src/test/ui/consts/const-eval/issue-44578.rs b/src/test/ui/consts/const-eval/issue-44578.rs index 79f1301a2f9..a88e2197048 100644 --- a/src/test/ui/consts/const-eval/issue-44578.rs +++ b/src/test/ui/consts/const-eval/issue-44578.rs @@ -25,5 +25,5 @@ impl Foo for u16 { fn main() { println!("{}", <Bar<u16, u8> as Foo>::AMT); - //~^ ERROR evaluation of constant value failed [E0080] + //~^ ERROR evaluation of constant value failed } diff --git a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr b/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr deleted file mode 100644 index 916a6c2bf12..00000000000 --- a/src/test/ui/suggestions/lifetimes/missing-lifetimes-in-signature.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0261]: use of undeclared lifetime name `'a` - --> $DIR/missing-lifetimes-in-signature.rs:36:11 - | -LL | fn baz<G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ - | - ^^ undeclared lifetime - | | - | help: consider introducing lifetime `'a` here: `'a,` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0261`. |
