about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-02-07 22:21:23 -0800
committerMichael Goulet <michael@errs.io>2022-02-11 12:45:51 -0800
commit67ad0ffdf8a979535eac7da6bec8626a87fb2843 (patch)
tree36c01a6c8b6a5d9cf8c44e5474e87c9964c766e3 /src
parenta431174c237755d6d46b7f50c147af755212b8ab (diff)
downloadrust-67ad0ffdf8a979535eac7da6bec8626a87fb2843.tar.gz
rust-67ad0ffdf8a979535eac7da6bec8626a87fb2843.zip
use body.tainted_by_error to skip loading MIR
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/consts/const-fn-error.rs1
-rw-r--r--src/test/ui/consts/const-fn-error.stderr18
2 files changed, 3 insertions, 16 deletions
diff --git a/src/test/ui/consts/const-fn-error.rs b/src/test/ui/consts/const-fn-error.rs
index 948c162e894..065944ea7ea 100644
--- a/src/test/ui/consts/const-fn-error.rs
+++ b/src/test/ui/consts/const-fn-error.rs
@@ -6,7 +6,6 @@ const fn f(x: usize) -> usize {
         //~^ ERROR mutable references
         //~| ERROR calls in constant functions
         //~| ERROR calls in constant functions
-        //~| ERROR E0080
         //~| ERROR `for` is not allowed in a `const fn`
         sum += i;
     }
diff --git a/src/test/ui/consts/const-fn-error.stderr b/src/test/ui/consts/const-fn-error.stderr
index df24585e555..e4b62f20a33 100644
--- a/src/test/ui/consts/const-fn-error.stderr
+++ b/src/test/ui/consts/const-fn-error.stderr
@@ -5,7 +5,7 @@ LL | /     for i in 0..x {
 LL | |
 LL | |
 LL | |
-...  |
+LL | |
 LL | |         sum += i;
 LL | |     }
    | |_____^
@@ -34,19 +34,7 @@ error[E0015]: calls in constant functions are limited to constant functions, tup
 LL |     for i in 0..x {
    |              ^^^^
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/const-fn-error.rs:5:14
-   |
-LL |     for i in 0..x {
-   |              ^^^^
-   |              |
-   |              calling non-const function `<std::ops::Range<usize> as IntoIterator>::into_iter`
-   |              inside `f` at $DIR/const-fn-error.rs:5:14
-...
-LL |     let a : [i32; f(X)];
-   |                   ---- inside `main::{constant#0}` at $DIR/const-fn-error.rs:18:19
-
-error: aborting due to 5 previous errors
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0015, E0080, E0658.
+Some errors have detailed explanations: E0015, E0658.
 For more information about an error, try `rustc --explain E0015`.