|
1 | | -error: generic parameters may not be used in const operations |
2 | | - --> $DIR/explicit_anon_consts.rs:8:41 |
3 | | - | |
4 | | -LL | type Adt3<const N: usize> = Foo<const { N }>; |
5 | | - | ^ cannot perform const operation using `N` |
6 | | - | |
7 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
8 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
9 | | - |
10 | | -error: generic parameters may not be used in const operations |
11 | | - --> $DIR/explicit_anon_consts.rs:16:42 |
12 | | - | |
13 | | -LL | type Arr3<const N: usize> = [(); const { N }]; |
14 | | - | ^ cannot perform const operation using `N` |
15 | | - | |
16 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
17 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
18 | | - |
19 | | -error: generic parameters may not be used in const operations |
20 | | - --> $DIR/explicit_anon_consts.rs:25:27 |
21 | | - | |
22 | | -LL | let _3 = [(); const { N }]; |
23 | | - | ^ cannot perform const operation using `N` |
24 | | - | |
25 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
26 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
27 | | - |
28 | | -error: generic parameters may not be used in const operations |
29 | | - --> $DIR/explicit_anon_consts.rs:37:46 |
30 | | - | |
31 | | -LL | const ITEM3<const N: usize>: usize = const { N }; |
32 | | - | ^ cannot perform const operation using `N` |
33 | | - | |
34 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
35 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
36 | | - |
37 | | -error: generic parameters may not be used in const operations |
38 | | - --> $DIR/explicit_anon_consts.rs:55:31 |
39 | | - | |
40 | | -LL | T3: Trait<ASSOC = const { N }>, |
41 | | - | ^ cannot perform const operation using `N` |
42 | | - | |
43 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
44 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
45 | | - |
46 | | -error: generic parameters may not be used in const operations |
47 | | - --> $DIR/explicit_anon_consts.rs:64:58 |
48 | | - | |
49 | | -LL | struct Default3<const N: usize, const M: usize = const { N }>; |
50 | | - | ^ cannot perform const operation using `N` |
51 | | - | |
52 | | - = help: const parameters may only be used as standalone arguments here, i.e. `N` |
53 | | - = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions |
54 | | - |
55 | 1 | error: complex const arguments must be placed inside of a `const` block |
56 | | - --> $DIR/explicit_anon_consts.rs:10:33 |
| 2 | + --> $DIR/explicit_anon_consts.rs:11:33 |
57 | 3 | | |
58 | 4 | LL | type Adt4<const N: usize> = Foo<{ 1 + 1 }>; |
59 | 5 | | ^^^^^^^^^ |
60 | 6 |
|
61 | 7 | error: complex const arguments must be placed inside of a `const` block |
62 | | - --> $DIR/explicit_anon_consts.rs:18:34 |
| 8 | + --> $DIR/explicit_anon_consts.rs:19:34 |
63 | 9 | | |
64 | 10 | LL | type Arr4<const N: usize> = [(); 1 + 1]; |
65 | 11 | | ^^^^^ |
66 | 12 |
|
67 | 13 | error: complex const arguments must be placed inside of a `const` block |
68 | | - --> $DIR/explicit_anon_consts.rs:27:19 |
| 14 | + --> $DIR/explicit_anon_consts.rs:28:19 |
69 | 15 | | |
70 | 16 | LL | let _4 = [(); 1 + 1]; |
71 | 17 | | ^^^^^ |
72 | 18 |
|
73 | 19 | error: complex const arguments must be placed inside of a `const` block |
74 | | - --> $DIR/explicit_anon_consts.rs:40:38 |
| 20 | + --> $DIR/explicit_anon_consts.rs:41:38 |
75 | 21 | | |
76 | 22 | LL | const ITEM4<const N: usize>: usize = { 1 + 1 }; |
77 | 23 | | ^^^^^^^^^ |
78 | 24 |
|
79 | 25 | error: complex const arguments must be placed inside of a `const` block |
80 | | - --> $DIR/explicit_anon_consts.rs:57:23 |
| 26 | + --> $DIR/explicit_anon_consts.rs:58:23 |
81 | 27 | | |
82 | 28 | LL | T4: Trait<ASSOC = { 1 + 1 }>, |
83 | 29 | | ^^^^^^^^^ |
84 | 30 |
|
85 | 31 | error: complex const arguments must be placed inside of a `const` block |
86 | | - --> $DIR/explicit_anon_consts.rs:66:50 |
| 32 | + --> $DIR/explicit_anon_consts.rs:67:50 |
87 | 33 | | |
88 | 34 | LL | struct Default4<const N: usize, const M: usize = { 1 + 1 }>; |
89 | 35 | | ^^^^^^^^^ |
90 | 36 |
|
91 | | -error: aborting due to 12 previous errors |
| 37 | +error: generic parameters may not be used in const operations |
| 38 | + --> $DIR/explicit_anon_consts.rs:8:41 |
| 39 | + | |
| 40 | +LL | type Adt3<const N: usize> = Foo<const { N }>; |
| 41 | + | ^ |
| 42 | + |
| 43 | +error: generic parameters may not be used in const operations |
| 44 | + --> $DIR/explicit_anon_consts.rs:17:42 |
| 45 | + | |
| 46 | +LL | type Arr3<const N: usize> = [(); const { N }]; |
| 47 | + | ^ |
| 48 | + |
| 49 | +error: generic parameters may not be used in const operations |
| 50 | + --> $DIR/explicit_anon_consts.rs:38:46 |
| 51 | + | |
| 52 | +LL | const ITEM3<const N: usize>: usize = const { N }; |
| 53 | + | ^ |
| 54 | + |
| 55 | +error: generic parameters may not be used in const operations |
| 56 | + --> $DIR/explicit_anon_consts.rs:56:31 |
| 57 | + | |
| 58 | +LL | T3: Trait<ASSOC = const { N }>, |
| 59 | + | ^ |
| 60 | + |
| 61 | +error: generic parameters may not be used in const operations |
| 62 | + --> $DIR/explicit_anon_consts.rs:65:58 |
| 63 | + | |
| 64 | +LL | struct Default3<const N: usize, const M: usize = const { N }>; |
| 65 | + | ^ |
| 66 | + |
| 67 | +error: generic parameters may not be used in const operations |
| 68 | + --> $DIR/explicit_anon_consts.rs:26:27 |
| 69 | + | |
| 70 | +LL | let _3 = [(); const { N }]; |
| 71 | + | ^ |
| 72 | + |
| 73 | +error: generic parameters may not be used in const operations |
| 74 | + --> $DIR/explicit_anon_consts.rs:8:41 |
| 75 | + | |
| 76 | +LL | type Adt3<const N: usize> = Foo<const { N }>; |
| 77 | + | ^ |
| 78 | + | |
| 79 | + = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no` |
| 80 | + |
| 81 | +error: aborting due to 13 previous errors |
92 | 82 |
|
0 commit comments