summary refs log tree commit diff
path: root/src/test/ui/const-eval/pub_const_err_bin.stderr
blob: a6db2176011d598e61ba6147d5350c8b4aa220ea (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
29
30
31
32
warning: attempt to subtract with overflow
  --> $DIR/pub_const_err_bin.rs:14:20
   |
LL | pub const Z: u32 = 0 - 1;
   |                    ^^^^^
   |
note: lint level defined here
  --> $DIR/pub_const_err_bin.rs:12:9
   |
LL | #![warn(const_err)]
   |         ^^^^^^^^^

warning: this constant cannot be used
  --> $DIR/pub_const_err_bin.rs:14: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:18:22
   |
LL | pub type Foo = [i32; 0 - 1];
   |                      ^^^^^

warning: this array length cannot be used
  --> $DIR/pub_const_err_bin.rs:18:22
   |
LL | pub type Foo = [i32; 0 - 1];
   |                      ^^^^^ attempt to subtract with overflow