]> git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/generic_const_exprs/dependence_lint.gce.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / const-generics / generic_const_exprs / dependence_lint.gce.stderr
1 error: overly complex generic constant
2 --> $DIR/dependence_lint.rs:16:9
3 |
4 LL | [0; if false { size_of::<T>() } else { 3 }]; // lint on stable, error with gce
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
6 |
7 = help: consider moving this anonymous constant into a `const` function
8
9 error: overly complex generic constant
10 --> $DIR/dependence_lint.rs:20:17
11 |
12 LL | let _: [u8; if true { size_of::<T>() } else { 3 }]; // error on stable, error with gce
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ control flow is not supported in generic constants
14 |
15 = help: consider moving this anonymous constant into a `const` function
16
17 error: unconstrained generic constant
18 --> $DIR/dependence_lint.rs:13:12
19 |
20 LL | let _: [u8; size_of::<*mut T>()]; // error on stable, error with gce
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^
22 |
23 = help: try adding a `where` bound using this expression: `where [(); size_of::<*mut T>()]:`
24
25 error: unconstrained generic constant
26 --> $DIR/dependence_lint.rs:9:9
27 |
28 LL | [0; size_of::<*mut T>()]; // lint on stable, error with `generic_const_exprs`
29 | ^^^^^^^^^^^^^^^^^^^
30 |
31 = help: try adding a `where` bound using this expression: `where [(); size_of::<*mut T>()]:`
32
33 error: aborting due to 4 previous errors
34