rust/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
805 B
Plaintext
Raw Normal View History

2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
2020-11-17 04:44:21 -06:00
--> $DIR/forbid-non-static-lifetimes.rs:7:22
|
LL | test::<{ let _: &'a (); 3 },>();
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
|
2023-05-05 15:42:51 -05:00
= note: lifetime parameters may not be used in const expressions
= help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
2023-05-05 15:42:51 -05:00
error: generic parameters may not be used in const operations
2020-11-17 04:44:21 -06:00
--> $DIR/forbid-non-static-lifetimes.rs:21:16
|
LL | [(); (|_: &'a u8| (), 0).1];
2023-05-05 15:42:51 -05:00
| ^^ cannot perform const operation using `'a`
|
2023-05-05 15:42:51 -05:00
= 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