summary refs log tree commit diff
path: root/src/test/ui/const-eval/issue-43197.stderr
blob: a22e8016296c4f95a3b2fe53907d52bd39a71db4 (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
33
34
35
36
37
38
warning: attempt to subtract with overflow
  --> $DIR/issue-43197.rs:20:20
   |
LL |     const X: u32 = 0-1;
   |                    ^^^
   |
   = note: #[warn(const_err)] on by default

warning: this constant cannot be used
  --> $DIR/issue-43197.rs:20:5
   |
LL |     const X: u32 = 0-1;
   |     ^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow

warning: attempt to subtract with overflow
  --> $DIR/issue-43197.rs:23:24
   |
LL |     const Y: u32 = foo(0-1);
   |                        ^^^

warning: this constant cannot be used
  --> $DIR/issue-43197.rs:23:5
   |
LL |     const Y: u32 = foo(0-1);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^ attempt to subtract with overflow

warning: constant evaluation error
  --> $DIR/issue-43197.rs:26:23
   |
LL |     println!("{} {}", X, Y);
   |                       ^ referenced constant has errors

warning: constant evaluation error
  --> $DIR/issue-43197.rs:26:26
   |
LL |     println!("{} {}", X, Y);
   |                          ^ referenced constant has errors