summaryrefslogtreecommitdiffstats
path: root/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
blob: 909b0476999f33ebb623047cfe31713ae98a3365 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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: add `#![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: add `#![feature(generic_const_exprs)]` to allow generic const expressions

error: aborting due to 2 previous errors