fork/rust

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

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

1.40.0
2.5 KiB93 linesraw
1error[E0308]: mismatched types
2  --> $DIR/coerce-to-bang.rs:6:17
3   |
4LL |     foo(return, 22, 44);
5   |                 ^^ expected !, found integer
6   |
7   = note: expected type `!`
8              found type `{integer}`
9
10error[E0308]: mismatched types
11  --> $DIR/coerce-to-bang.rs:18:13
12   |
13LL |     foo(22, 44, return);
14   |             ^^ expected !, found integer
15   |
16   = note: expected type `!`
17              found type `{integer}`
18
19error[E0308]: mismatched types
20  --> $DIR/coerce-to-bang.rs:26:12
21   |
22LL |     foo(a, b, c); // ... and hence a reference to `a` is expected to diverge.
23   |            ^ expected !, found integer
24   |
25   = note: expected type `!`
26              found type `{integer}`
27
28error[E0308]: mismatched types
29  --> $DIR/coerce-to-bang.rs:36:12
30   |
31LL |     foo(a, b, c);
32   |            ^ expected !, found integer
33   |
34   = note: expected type `!`
35              found type `{integer}`
36
37error[E0308]: mismatched types
38  --> $DIR/coerce-to-bang.rs:45:12
39   |
40LL |     foo(a, b, c);
41   |            ^ expected !, found integer
42   |
43   = note: expected type `!`
44              found type `{integer}`
45
46error[E0308]: mismatched types
47  --> $DIR/coerce-to-bang.rs:50:21
48   |
49LL |     let x: [!; 2] = [return, 22];
50   |                     ^^^^^^^^^^^^ expected !, found integer
51   |
52   = note: expected type `[!; 2]`
53              found type `[{integer}; 2]`
54
55error[E0308]: mismatched types
56  --> $DIR/coerce-to-bang.rs:55:22
57   |
58LL |     let x: [!; 2] = [22, return];
59   |                      ^^ expected !, found integer
60   |
61   = note: expected type `!`
62              found type `{integer}`
63
64error[E0308]: mismatched types
65  --> $DIR/coerce-to-bang.rs:60:37
66   |
67LL |     let x: (usize, !, usize) = (22, 44, 66);
68   |                                     ^^ expected !, found integer
69   |
70   = note: expected type `!`
71              found type `{integer}`
72
73error[E0308]: mismatched types
74  --> $DIR/coerce-to-bang.rs:65:41
75   |
76LL |     let x: (usize, !, usize) = (return, 44, 66);
77   |                                         ^^ expected !, found integer
78   |
79   = note: expected type `!`
80              found type `{integer}`
81
82error[E0308]: mismatched types
83  --> $DIR/coerce-to-bang.rs:76:37
84   |
85LL |     let x: (usize, !, usize) = (22, 44, return);
86   |                                     ^^ expected !, found integer
87   |
88   = note: expected type `!`
89              found type `{integer}`
90
91error: aborting due to 10 previous errors
92
93For more information about this error, try `rustc --explain E0308`.