summary refs log tree commit diff
path: root/src/test/ui/const-generics/array-size-in-generic-struct-param.stderr
blob: 05f30a1cc5ed6fc15d5c625761732a0a84615243 (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
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
  --> $DIR/array-size-in-generic-struct-param.rs:1:12
   |
LL | #![feature(const_generics)]
   |            ^^^^^^^^^^^^^^
   |
   = note: `#[warn(incomplete_features)]` on by default

error: constant expression depends on a generic parameter
  --> $DIR/array-size-in-generic-struct-param.rs:5:38
   |
LL | struct ArithArrayLen<const N: usize>([u32; 0 + N]);
   |                                      ^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: constant expression depends on a generic parameter
  --> $DIR/array-size-in-generic-struct-param.rs:14:5
   |
LL |     arr: [u8; CFG.arr_size],
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this may fail depending on what value the parameter takes

error: aborting due to 2 previous errors; 1 warning emitted