about summary refs log tree commit diff
path: root/tests/ui/const-generics/generic_const_exprs/trivial-anon-const-use-cases.full.stderr
blob: 586ac63016c8789524aa028b8b0e2b46f063c504 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
error: unconstrained generic constant
  --> $DIR/trivial-anon-const-use-cases.rs:14:12
   |
LL |     stuff: [u8; { S + 1 }], // `S + 1` is NOT a valid const expression in this context.
   |            ^^^^^^^^^^^^^^^
   |
help: try adding a `where` bound
   |
LL | struct Y<const S: usize> where [(); { S + 1 }]: {
   |                          ++++++++++++++++++++++

error: aborting due to 1 previous error