blob: 82baab620ffab3167ed509263fc3f737db8ec4da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
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
|