2022-05-17 00:50:16 -05:00
|
|
|
error: overly complex generic constant
|
2022-10-18 09:31:56 -05:00
|
|
|
--> $DIR/dependence_lint.rs:17:9
|
2022-05-17 00:50:16 -05:00
|
|
|
|
|
|
|
|
LL | [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
|
|
|
|
|
|
|
|
|
= help: consider moving this anonymous constant into a `const` function
|
|
|
|
|
|
|
|
error: overly complex generic constant
|
2022-10-18 09:31:56 -05:00
|
|
|
--> $DIR/dependence_lint.rs:21:17
|
2022-05-17 00:50:16 -05:00
|
|
|
|
|
|
|
|
LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
|
|
|
|
|
|
|
|
|
= help: consider moving this anonymous constant into a `const` function
|
|
|
|
|
|
|
|
error: unconstrained generic constant
|
2022-10-18 09:31:56 -05:00
|
|
|
--> $DIR/dependence_lint.rs:14:12
|
2022-05-17 00:50:16 -05:00
|
|
|
|
|
|
|
|
LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try adding a `where` bound using this expression: `where [(); size_of::<*mut T>()]:`
|
|
|
|
|
|
|
|
error: unconstrained generic constant
|
2022-10-18 09:31:56 -05:00
|
|
|
--> $DIR/dependence_lint.rs:10:9
|
2022-05-17 00:50:16 -05:00
|
|
|
|
|
|
|
|
LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: try adding a `where` bound using this expression: `where [(); size_of::<*mut T>()]:`
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|