]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/pub_const_err_bin.stderr
73229c60d14dbe45a07d7d2be07afc3b25ac6ed8
[rust.git] / src / test / ui / consts / const-eval / pub_const_err_bin.stderr
1 warning: this constant cannot be used
2   --> $DIR/pub_const_err_bin.rs:14:1
3    |
4 LL | pub const Z: u32 = 0 - 1;
5    | ^^^^^^^^^^^^^^^^^^^-----^
6    |                    |
7    |                    attempt to subtract with overflow
8    |
9 note: lint level defined here
10   --> $DIR/pub_const_err_bin.rs:12:9
11    |
12 LL | #![warn(const_err)]
13    |         ^^^^^^^^^
14
15 warning: attempt to subtract with overflow
16   --> $DIR/pub_const_err_bin.rs:17:22
17    |
18 LL | pub type Foo = [i32; 0 - 1];
19    |                      ^^^^^
20
21 warning: this array length cannot be used
22   --> $DIR/pub_const_err_bin.rs:17:22
23    |
24 LL | pub type Foo = [i32; 0 - 1];
25    |                      ^^^^^ attempt to subtract with overflow
26