summary refs log tree commit diff
path: root/src/test/ui/const-generics/min_const_generics/complex-expression.stderr
blob: baed8d13f00f1f6d2c934df21f30799f4757ca06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/complex-expression.rs:9:38
   |
LL | struct Break0<const N: usize>([u8; { N + 1 }]);
   |                                      ^ non-trivial anonymous constants must not depend on the parameter `N`
   |
   = help: it is currently only allowed to use either `N` or `{ N }` as generic constants

error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/complex-expression.rs:12:40
   |
LL | struct Break1<const N: usize>([u8; { { N } }]);
   |                                        ^ non-trivial anonymous constants must not depend on the parameter `N`
   |
   = help: it is currently only allowed to use either `N` or `{ N }` as generic constants

error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/complex-expression.rs:16:17
   |
LL |     let _: [u8; N + 1];
   |                 ^ non-trivial anonymous constants must not depend on the parameter `N`
   |
   = help: it is currently only allowed to use either `N` or `{ N }` as generic constants

error: generic parameters must not be used inside of non trivial constant values
  --> $DIR/complex-expression.rs:21:17
   |
LL |     let _ = [0; N + 1];
   |                 ^ non-trivial anonymous constants must not depend on the parameter `N`
   |
   = help: it is currently only allowed to use either `N` or `{ N }` as generic constants

error: aborting due to 4 previous errors