summaryrefslogtreecommitdiff
path: root/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr')
-rw-r--r--tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
index 5f641b07095..7726016eb83 100644
--- a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
+++ b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
@@ -1,21 +1,20 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
--> $DIR/forbid-non-static-lifetimes.rs:7:22
|
LL | test::<{ let _: &'a (); 3 },>();
- | ^^
+ | ^^ cannot perform const operation using `'a`
|
- = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
- = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+ = note: lifetime parameters may not be used in const expressions
+ = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
--> $DIR/forbid-non-static-lifetimes.rs:21:16
|
LL | [(); (|_: &'a u8| (), 0).1];
- | ^^
+ | ^^ cannot perform const operation using `'a`
|
- = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
- = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+ = note: lifetime parameters may not be used in const expressions
+ = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
error: aborting due to 2 previous errors
-For more information about this error, try `rustc --explain E0658`.