rust/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
2023-05-05 21:42:54 +01:00

21 lines
805 B
Plaintext

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: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
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: 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