summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/promoted_errors.stderr
blob: 848a880ba492ffabe21f3de70879e876de511ec1 (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
39
40
41
42
43
44
45
46
47
48
49
50
error: this expression will panic at runtime
  --> $DIR/promoted_errors.rs:7:14
   |
LL |     let _x = 0u32 - 1;
   |              ^^^^^^^^ attempt to subtract with overflow
   |
note: lint level defined here
  --> $DIR/promoted_errors.rs:3:9
   |
LL | #![deny(const_err)]
   |         ^^^^^^^^^

error: attempt to divide by zero
  --> $DIR/promoted_errors.rs:9:20
   |
LL |     println!("{}", 1/(1-1));
   |                    ^^^^^^^

error: reaching this expression at runtime will panic or abort
  --> $DIR/promoted_errors.rs:9:20
   |
LL |     println!("{}", 1/(1-1));
   |                    ^^^^^^^ dividing by zero

error: attempt to divide by zero
  --> $DIR/promoted_errors.rs:12:14
   |
LL |     let _x = 1/(1-1);
   |              ^^^^^^^

error: attempt to divide by zero
  --> $DIR/promoted_errors.rs:14:20
   |
LL |     println!("{}", 1/(false as u32));
   |                    ^^^^^^^^^^^^^^^^

error: reaching this expression at runtime will panic or abort
  --> $DIR/promoted_errors.rs:14:20
   |
LL |     println!("{}", 1/(false as u32));
   |                    ^^^^^^^^^^^^^^^^ dividing by zero

error: attempt to divide by zero
  --> $DIR/promoted_errors.rs:17:14
   |
LL |     let _x = 1/(false as u32);
   |              ^^^^^^^^^^^^^^^^

error: aborting due to 7 previous errors