summaryrefslogtreecommitdiffstats
path: root/src/test/ui/const-generics/defaults/complex-generic-default-expr.min.stderr
blob: b836cfeaedbb774a5e04546ae73b15bab3e240a3 (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/complex-generic-default-expr.rs:6:47
   |
LL | struct Foo<const N: usize, const M: usize = { N + 1 }>;
   |                                               ^ cannot perform const operation using `N`
   |
   = help: const parameters may only be used as standalone arguments, i.e. `N`
   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions

error: generic parameters may not be used in const operations
  --> $DIR/complex-generic-default-expr.rs:9:62
   |
LL | struct Bar<T, const TYPE_SIZE: usize = { std::mem::size_of::<T>() }>(T);
   |                                                              ^ cannot perform const operation using `T`
   |
   = note: type 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