fork/rust
git clone https://git.julia.blue/fork/rust
73528e339aa
1.40.0
1warning: any use of this value will cause an error 2 --> $DIR/issue-43197.rs:8:20 3 | 4LL | const X: u32 = 0-1; 5 | ---------------^^^- 6 | | 7 | attempt to subtract with overflow 8 | 9note: lint level defined here 10 --> $DIR/issue-43197.rs:1:9 11 | 12LL | #![warn(const_err)] 13 | ^^^^^^^^^ 14 15warning: any use of this value will cause an error 16 --> $DIR/issue-43197.rs:10:24 17 | 18LL | const Y: u32 = foo(0-1); 19 | -------------------^^^-- 20 | | 21 | attempt to subtract with overflow 22 23error[E0080]: evaluation of constant expression failed 24 --> $DIR/issue-43197.rs:12:23 25 | 26LL | println!("{} {}", X, Y); 27 | ^ referenced constant has errors 28 29error[E0080]: evaluation of constant expression failed 30 --> $DIR/issue-43197.rs:12:26 31 | 32LL | println!("{} {}", X, Y); 33 | ^ referenced constant has errors 34 35error: aborting due to 2 previous errors 36 37For more information about this error, try `rustc --explain E0080`.