@@ -9,16 +9,27 @@ help: try adding a `where` bound
9
9
LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
10
10
| ++++++++++++++++++++++++++++++++
11
11
12
+ error: unconstrained generic constant
13
+ --> $DIR/dependence_lint.rs:10:5
14
+ |
15
+ LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
16
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
17
+ |
18
+ help: try adding a `where` bound
19
+ |
20
+ LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
21
+ | ++++++++++++++++++++++++++++++++
22
+
12
23
error: overly complex generic constant
13
- --> $DIR/dependence_lint.rs:17 :9
24
+ --> $DIR/dependence_lint.rs:18 :9
14
25
|
15
26
LL | [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
16
27
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
17
28
|
18
29
= help: consider moving this anonymous constant into a `const` function
19
30
20
31
error: unconstrained generic constant
21
- --> $DIR/dependence_lint.rs:14 :12
32
+ --> $DIR/dependence_lint.rs:15 :12
22
33
|
23
34
LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
24
35
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -29,12 +40,12 @@ LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
29
40
| ++++++++++++++++++++++++++++++++
30
41
31
42
error: overly complex generic constant
32
- --> $DIR/dependence_lint.rs:21 :17
43
+ --> $DIR/dependence_lint.rs:22 :17
33
44
|
34
45
LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
35
46
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
36
47
|
37
48
= help: consider moving this anonymous constant into a `const` function
38
49
39
- error: aborting due to 4 previous errors
50
+ error: aborting due to 5 previous errors
40
51
0 commit comments