fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
3.2 KiB111 linesraw
1error[E0308]: mismatched types
2  --> $DIR/const-integer-bool-ops.rs:1:18
3   |
4LL | const X: usize = 42 && 39;
5   |                  ^^ expected `bool`, found integer
6
7error[E0308]: mismatched types
8  --> $DIR/const-integer-bool-ops.rs:1:24
9   |
10LL | const X: usize = 42 && 39;
11   |                        ^^ expected `bool`, found integer
12
13error[E0308]: mismatched types
14  --> $DIR/const-integer-bool-ops.rs:1:18
15   |
16LL | const X: usize = 42 && 39;
17   |                  ^^^^^^^^ expected `usize`, found `bool`
18
19error[E0308]: mismatched types
20  --> $DIR/const-integer-bool-ops.rs:10:19
21   |
22LL | const X1: usize = 42 || 39;
23   |                   ^^ expected `bool`, found integer
24
25error[E0308]: mismatched types
26  --> $DIR/const-integer-bool-ops.rs:10:25
27   |
28LL | const X1: usize = 42 || 39;
29   |                         ^^ expected `bool`, found integer
30
31error[E0308]: mismatched types
32  --> $DIR/const-integer-bool-ops.rs:10:19
33   |
34LL | const X1: usize = 42 || 39;
35   |                   ^^^^^^^^ expected `usize`, found `bool`
36
37error[E0308]: mismatched types
38  --> $DIR/const-integer-bool-ops.rs:19:19
39   |
40LL | const X2: usize = -42 || -39;
41   |                   ^^^ expected `bool`, found integer
42
43error[E0308]: mismatched types
44  --> $DIR/const-integer-bool-ops.rs:19:26
45   |
46LL | const X2: usize = -42 || -39;
47   |                          ^^^ expected `bool`, found integer
48
49error[E0308]: mismatched types
50  --> $DIR/const-integer-bool-ops.rs:19:19
51   |
52LL | const X2: usize = -42 || -39;
53   |                   ^^^^^^^^^^ expected `usize`, found `bool`
54
55error[E0308]: mismatched types
56  --> $DIR/const-integer-bool-ops.rs:28:19
57   |
58LL | const X3: usize = -42 && -39;
59   |                   ^^^ expected `bool`, found integer
60
61error[E0308]: mismatched types
62  --> $DIR/const-integer-bool-ops.rs:28:26
63   |
64LL | const X3: usize = -42 && -39;
65   |                          ^^^ expected `bool`, found integer
66
67error[E0308]: mismatched types
68  --> $DIR/const-integer-bool-ops.rs:28:19
69   |
70LL | const X3: usize = -42 && -39;
71   |                   ^^^^^^^^^^ expected `usize`, found `bool`
72
73error[E0308]: mismatched types
74  --> $DIR/const-integer-bool-ops.rs:37:18
75   |
76LL | const Y: usize = 42.0 == 42.0;
77   |                  ^^^^^^^^^^^^ expected `usize`, found `bool`
78
79error[E0308]: mismatched types
80  --> $DIR/const-integer-bool-ops.rs:42:19
81   |
82LL | const Y1: usize = 42.0 >= 42.0;
83   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
84
85error[E0308]: mismatched types
86  --> $DIR/const-integer-bool-ops.rs:47:19
87   |
88LL | const Y2: usize = 42.0 <= 42.0;
89   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
90
91error[E0308]: mismatched types
92  --> $DIR/const-integer-bool-ops.rs:52:19
93   |
94LL | const Y3: usize = 42.0 > 42.0;
95   |                   ^^^^^^^^^^^ expected `usize`, found `bool`
96
97error[E0308]: mismatched types
98  --> $DIR/const-integer-bool-ops.rs:57:19
99   |
100LL | const Y4: usize = 42.0 < 42.0;
101   |                   ^^^^^^^^^^^ expected `usize`, found `bool`
102
103error[E0308]: mismatched types
104  --> $DIR/const-integer-bool-ops.rs:62:19
105   |
106LL | const Y5: usize = 42.0 != 42.0;
107   |                   ^^^^^^^^^^^^ expected `usize`, found `bool`
108
109error: aborting due to 18 previous errors
110
111For more information about this error, try `rustc --explain E0308`.