summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/promoted_errors.opt.stderr
blob: 48878261782446854b568d17080c5d698b9a2641 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
warning: this arithmetic operation will overflow
  --> $DIR/promoted_errors.rs:14:14
   |
LL |     let _x = 0u32 - 1;
   |              ^^^^^^^^ attempt to subtract with overflow
   |
note: the lint level is defined here
  --> $DIR/promoted_errors.rs:9:20
   |
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
   |                    ^^^^^^^^^^^^^^^^^^^

warning: this operation will panic at runtime
  --> $DIR/promoted_errors.rs:16:20
   |
LL |     println!("{}", 1 / (1 - 1));
   |                    ^^^^^^^^^^^ attempt to divide by zero
   |
note: the lint level is defined here
  --> $DIR/promoted_errors.rs:9:41
   |
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
   |                                         ^^^^^^^^^^^^^^^^^^^

warning: reaching this expression at runtime will panic or abort
  --> $DIR/promoted_errors.rs:16:20
   |
LL |     println!("{}", 1 / (1 - 1));
   |                    ^^^^^^^^^^^ dividing by zero
   |
note: the lint level is defined here
  --> $DIR/promoted_errors.rs:9:9
   |
LL | #![warn(const_err, arithmetic_overflow, unconditional_panic)]
   |         ^^^^^^^^^

warning: erroneous constant used
  --> $DIR/promoted_errors.rs:16:20
   |
LL |     println!("{}", 1 / (1 - 1));
   |                    ^^^^^^^^^^^ referenced constant has errors

warning: this operation will panic at runtime
  --> $DIR/promoted_errors.rs:20:14
   |
LL |     let _x = 1 / (1 - 1);
   |              ^^^^^^^^^^^ attempt to divide by zero

warning: this operation will panic at runtime
  --> $DIR/promoted_errors.rs:22:20
   |
LL |     println!("{}", 1 / (false as u32));
   |                    ^^^^^^^^^^^^^^^^^^ attempt to divide by zero

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

warning: erroneous constant used
  --> $DIR/promoted_errors.rs:22:20
   |
LL |     println!("{}", 1 / (false as u32));
   |                    ^^^^^^^^^^^^^^^^^^ referenced constant has errors

warning: this operation will panic at runtime
  --> $DIR/promoted_errors.rs:26:14
   |
LL |     let _x = 1 / (false as u32);
   |              ^^^^^^^^^^^^^^^^^^ attempt to divide by zero

warning: 9 warnings emitted