diff --git a/src/test/ui/consts/const-fn-error.rs b/src/test/ui/consts/const-fn-error.rs index b9c5a0e040d..948c162e894 100644 --- a/src/test/ui/consts/const-fn-error.rs +++ b/src/test/ui/consts/const-fn-error.rs @@ -7,7 +7,7 @@ const fn f(x: usize) -> usize { //~| ERROR calls in constant functions //~| ERROR calls in constant functions //~| ERROR E0080 - //~| ERROR E0744 + //~| ERROR `for` is not allowed in a `const fn` sum += i; } sum diff --git a/src/test/ui/consts/const-fn-error.stderr b/src/test/ui/consts/const-fn-error.stderr index f5e69bba4c5..df24585e555 100644 --- a/src/test/ui/consts/const-fn-error.stderr +++ b/src/test/ui/consts/const-fn-error.stderr @@ -1,4 +1,4 @@ -error[E0744]: `for` is not allowed in a `const fn` +error[E0658]: `for` is not allowed in a `const fn` --> $DIR/const-fn-error.rs:5:5 | LL | / for i in 0..x { @@ -9,6 +9,9 @@ LL | | LL | | sum += i; LL | | } | |_____^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable error[E0015]: calls in constant functions are limited to constant functions, tuple structs and tuple variants --> $DIR/const-fn-error.rs:5:14 @@ -45,5 +48,5 @@ LL | let a : [i32; f(X)]; error: aborting due to 5 previous errors -Some errors have detailed explanations: E0015, E0080, E0658, E0744. +Some errors have detailed explanations: E0015, E0080, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/consts/const-for-feature-gate.stderr b/src/test/ui/consts/const-for-feature-gate.stderr index c1b46ef7376..2ea377e09f6 100644 --- a/src/test/ui/consts/const-for-feature-gate.stderr +++ b/src/test/ui/consts/const-for-feature-gate.stderr @@ -4,6 +4,7 @@ error[E0658]: `for` is not allowed in a `const` LL | for _ in 0..5 {} | ^^^^^^^^^^^^^^^^ | + = note: see issue #87575 for more information = help: add `#![feature(const_for)]` to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/const-try-feature-gate.stderr b/src/test/ui/consts/const-try-feature-gate.stderr index 9e3aa09ab00..cd1a0630432 100644 --- a/src/test/ui/consts/const-try-feature-gate.stderr +++ b/src/test/ui/consts/const-try-feature-gate.stderr @@ -4,6 +4,7 @@ error[E0658]: `?` is not allowed in a `const fn` LL | Some(())?; | ^^^^^^^^^ | + = note: see issue #74935 for more information = help: add `#![feature(const_try)]` to the crate attributes to enable error: aborting due to previous error diff --git a/src/test/ui/consts/control-flow/loop.stderr b/src/test/ui/consts/control-flow/loop.stderr index 7b99fa4fe46..5f6ad8c105d 100644 --- a/src/test/ui/consts/control-flow/loop.stderr +++ b/src/test/ui/consts/control-flow/loop.stderr @@ -1,19 +1,25 @@ -error[E0744]: `for` is not allowed in a `const` +error[E0658]: `for` is not allowed in a `const` --> $DIR/loop.rs:53:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable -error[E0744]: `for` is not allowed in a `const` +error[E0658]: `for` is not allowed in a `const` --> $DIR/loop.rs:57:5 | LL | / for i in 0..4 { LL | | x += i; LL | | } | |_____^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable error: aborting due to 2 previous errors -For more information about this error, try `rustc --explain E0744`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/consts/control-flow/try.stderr b/src/test/ui/consts/control-flow/try.stderr index 35075a3e60b..5aeec8fbf86 100644 --- a/src/test/ui/consts/control-flow/try.stderr +++ b/src/test/ui/consts/control-flow/try.stderr @@ -1,9 +1,12 @@ -error[E0744]: `?` is not allowed in a `const fn` +error[E0658]: `?` is not allowed in a `const fn` --> $DIR/try.rs:6:5 | LL | x?; | ^^ + | + = note: see issue #74935 for more information + = help: add `#![feature(const_try)]` to the crate attributes to enable error: aborting due to previous error -For more information about this error, try `rustc --explain E0744`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/issues/issue-50582.stderr b/src/test/ui/issues/issue-50582.stderr index 4f531460e69..465fb9baac3 100644 --- a/src/test/ui/issues/issue-50582.stderr +++ b/src/test/ui/issues/issue-50582.stderr @@ -1,8 +1,11 @@ -error[E0744]: `for` is not allowed in a `const` +error[E0658]: `for` is not allowed in a `const` --> $DIR/issue-50582.rs:2:20 | LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); | ^^^^^^^^^^^^^^^^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable error[E0277]: cannot add `()` to `{integer}` --> $DIR/issue-50582.rs:2:18 @@ -14,5 +17,5 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new(); error: aborting due to 2 previous errors -Some errors have detailed explanations: E0277, E0744. +Some errors have detailed explanations: E0277, E0658. For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/issues/issue-50585.stderr b/src/test/ui/issues/issue-50585.stderr index c2630b664b5..e43cc20cbb5 100644 --- a/src/test/ui/issues/issue-50585.stderr +++ b/src/test/ui/issues/issue-50585.stderr @@ -1,8 +1,11 @@ -error[E0744]: `for` is not allowed in a `const` +error[E0658]: `for` is not allowed in a `const` --> $DIR/issue-50585.rs:2:18 | LL | |y: Vec<[(); for x in 0..2 {}]>| {}; | ^^^^^^^^^^^^^^^^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable error[E0308]: mismatched types --> $DIR/issue-50585.rs:2:18 @@ -12,5 +15,5 @@ LL | |y: Vec<[(); for x in 0..2 {}]>| {}; error: aborting due to 2 previous errors -Some errors have detailed explanations: E0308, E0744. +Some errors have detailed explanations: E0308, E0658. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/never_type/issue-52443.stderr b/src/test/ui/never_type/issue-52443.stderr index 1683841e9d7..26ab5f43a27 100644 --- a/src/test/ui/never_type/issue-52443.stderr +++ b/src/test/ui/never_type/issue-52443.stderr @@ -6,11 +6,14 @@ LL | [(); {while true {break}; 0}]; | = note: `#[warn(while_true)]` on by default -error[E0744]: `for` is not allowed in a `const` +error[E0658]: `for` is not allowed in a `const` --> $DIR/issue-52443.rs:9:12 | LL | [(); { for _ in 0usize.. {}; 0}]; | ^^^^^^^^^^^^^^^^^^^^ + | + = note: see issue #87575 for more information + = help: add `#![feature(const_for)]` to the crate attributes to enable error[E0308]: mismatched types --> $DIR/issue-52443.rs:2:10 @@ -56,5 +59,5 @@ LL | [(); { for _ in 0usize.. {}; 0}]; error: aborting due to 6 previous errors; 1 warning emitted -Some errors have detailed explanations: E0015, E0308, E0658, E0744. +Some errors have detailed explanations: E0015, E0308, E0658. For more information about an error, try `rustc --explain E0015`. diff --git a/src/test/ui/rfc-2632-const-trait-impl/hir-const-check.stderr b/src/test/ui/rfc-2632-const-trait-impl/hir-const-check.stderr index 3ec329cba1e..32df63e449d 100644 --- a/src/test/ui/rfc-2632-const-trait-impl/hir-const-check.stderr +++ b/src/test/ui/rfc-2632-const-trait-impl/hir-const-check.stderr @@ -1,9 +1,12 @@ -error[E0744]: `?` is not allowed in a `const fn` +error[E0658]: `?` is not allowed in a `const fn` --> $DIR/hir-const-check.rs:11:9 | LL | Some(())?; | ^^^^^^^^^ + | + = note: see issue #74935 for more information + = help: add `#![feature(const_try)]` to the crate attributes to enable error: aborting due to previous error -For more information about this error, try `rustc --explain E0744`. +For more information about this error, try `rustc --explain E0658`.