blob: 82baab620ffab3167ed509263fc3f737db8ec4da [file] [log] [blame]
warning: constant evaluation error: attempt to subtract with overflow
--> $DIR/issue-43197.rs:18:20
|
18 | const X: u32 = 0-1; //~ ERROR constant evaluation error
| ^^^
|
= note: #[warn(const_err)] on by default
warning: constant evaluation error: attempt to subtract with overflow
--> $DIR/issue-43197.rs:20:20
|
20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error
| ^^^^^^^^
error[E0080]: constant evaluation error
--> $DIR/issue-43197.rs:18:20
|
18 | const X: u32 = 0-1; //~ ERROR constant evaluation error
| ^^^ attempt to subtract with overflow
error[E0080]: constant evaluation error
--> $DIR/issue-43197.rs:20:24
|
20 | const Y: u32 = foo(0-1); //~ ERROR constant evaluation error
| ^^^ attempt to subtract with overflow
error: aborting due to 2 previous errors