blob: 3e8966d854bf0ff49d9b8c9998c4735d8b6fb990 (
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
|
warning: attempt to subtract with overflow
--> $DIR/pub_const_err_bin.rs:13:20
|
LL | pub const Z: u32 = 0 - 1;
| ^^^^^
|
= note: #[warn(const_err)] on by default
warning: this constant cannot be used
--> $DIR/pub_const_err_bin.rs:13:1
|
LL | pub const Z: u32 = 0 - 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow
warning: attempt to subtract with overflow
--> $DIR/pub_const_err_bin.rs:17:22
|
LL | pub type Foo = [i32; 0 - 1];
| ^^^^^
warning: this array length cannot be used
--> $DIR/pub_const_err_bin.rs:17:22
|
LL | pub type Foo = [i32; 0 - 1];
| ^^^^^ attempt to subtract with overflow
|