fork/rust
git clone https://git.julia.blue/fork/rust
4fb7144ed15
1.43.0
1warning: any use of this value will cause an error 2 --> $DIR/issue-43197.rs:10:20 3 | 4LL | const X: u32 = 0 - 1; 5 | ---------------^^^^^- 6 | | 7 | attempt to subtract with overflow 8 | 9note: the lint level is defined here 10 --> $DIR/issue-43197.rs:3:9 11 | 12LL | #![warn(const_err)] 13 | ^^^^^^^^^ 14 15warning: any use of this value will cause an error 16 --> $DIR/issue-43197.rs:12: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:14:23 25 | 26LL | println!("{} {}", X, Y); 27 | ^ referenced constant has errors 28 29warning: erroneous constant used 30 --> $DIR/issue-43197.rs:14:23 31 | 32LL | println!("{} {}", X, Y); 33 | ^ referenced constant has errors 34 35error[E0080]: evaluation of constant expression failed 36 --> $DIR/issue-43197.rs:14:26 37 | 38LL | println!("{} {}", X, Y); 39 | ^ referenced constant has errors 40 41warning: erroneous constant used 42 --> $DIR/issue-43197.rs:14:26 43 | 44LL | println!("{} {}", X, Y); 45 | ^ referenced constant has errors 46 47error: aborting due to 2 previous errors 48 49For more information about this error, try `rustc --explain E0080`.