fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.3 KiB34 linesraw
1error: overly complex generic constant
2  --> $DIR/dependence_lint.rs:17:9
3   |
4LL |     [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
9error: overly complex generic constant
10  --> $DIR/dependence_lint.rs:21:17
11   |
12LL |     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
17error: unconstrained generic constant
18  --> $DIR/dependence_lint.rs:14:12
19   |
20LL |     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
25error: unconstrained generic constant
26  --> $DIR/dependence_lint.rs:10:9
27   |
28LL |     [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
33error: aborting due to 4 previous errors
34