1
1
error: overly complex generic constant
2
- --> $DIR/dependence_lint.rs:21 :17
2
+ --> $DIR/dependence_lint.rs:22 :17
3
3
|
4
4
LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
5
5
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
6
6
|
7
7
= help: consider moving this anonymous constant into a `const` function
8
8
9
9
error: unconstrained generic constant
10
- --> $DIR/dependence_lint.rs:14 :12
10
+ --> $DIR/dependence_lint.rs:15 :12
11
11
|
12
12
LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -28,13 +28,24 @@ help: try adding a `where` bound
28
28
LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
29
29
| ++++++++++++++++++++++++++++++++
30
30
31
+ error: unconstrained generic constant
32
+ --> $DIR/dependence_lint.rs:10:5
33
+ |
34
+ LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
35
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
36
+ |
37
+ help: try adding a `where` bound
38
+ |
39
+ LL | fn foo<T>() where [(); size_of::<*mut T>()]: {
40
+ | ++++++++++++++++++++++++++++++++
41
+
31
42
error: overly complex generic constant
32
- --> $DIR/dependence_lint.rs:17 :9
43
+ --> $DIR/dependence_lint.rs:18 :9
33
44
|
34
45
LL | [0; if false { size_of::<T>() } else { 3 }]; // lint 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