fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.5 KiB130 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   |     arguments to this function are incorrect
8   |
9   = note: expected type `!`
10              found type `{integer}`
11note: function defined here
12  --> $DIR/coerce-to-bang.rs:3:4
13   |
14LL | fn foo(x: usize, y: !, z: usize) { }
15   |    ^^^           ----
16
17error[E0308]: mismatched types
18  --> $DIR/coerce-to-bang.rs:18:13
19   |
20LL |     foo(22, 44, return);
21   |     ---     ^^ expected `!`, found integer
22   |     |
23   |     arguments to this function are incorrect
24   |
25   = note: expected type `!`
26              found type `{integer}`
27note: function defined here
28  --> $DIR/coerce-to-bang.rs:3:4
29   |
30LL | fn foo(x: usize, y: !, z: usize) { }
31   |    ^^^           ----
32
33error[E0308]: mismatched types
34  --> $DIR/coerce-to-bang.rs:26:12
35   |
36LL |     foo(a, b, c); // ... and hence a reference to `a` is expected to diverge.
37   |     ---    ^ expected `!`, found integer
38   |     |
39   |     arguments to this function are incorrect
40   |
41   = note: expected type `!`
42              found type `{integer}`
43note: function defined here
44  --> $DIR/coerce-to-bang.rs:3:4
45   |
46LL | fn foo(x: usize, y: !, z: usize) { }
47   |    ^^^           ----
48
49error[E0308]: mismatched types
50  --> $DIR/coerce-to-bang.rs:36:12
51   |
52LL |     foo(a, b, c);
53   |     ---    ^ expected `!`, found integer
54   |     |
55   |     arguments to this function are incorrect
56   |
57   = note: expected type `!`
58              found type `{integer}`
59note: function defined here
60  --> $DIR/coerce-to-bang.rs:3:4
61   |
62LL | fn foo(x: usize, y: !, z: usize) { }
63   |    ^^^           ----
64
65error[E0308]: mismatched types
66  --> $DIR/coerce-to-bang.rs:45:12
67   |
68LL |     foo(a, b, c);
69   |     ---    ^ expected `!`, found integer
70   |     |
71   |     arguments to this function are incorrect
72   |
73   = note: expected type `!`
74              found type `{integer}`
75note: function defined here
76  --> $DIR/coerce-to-bang.rs:3:4
77   |
78LL | fn foo(x: usize, y: !, z: usize) { }
79   |    ^^^           ----
80
81error[E0308]: mismatched types
82  --> $DIR/coerce-to-bang.rs:50:21
83   |
84LL |     let x: [!; 2] = [return, 22];
85   |            ------   ^^^^^^^^^^^^ expected `[!; 2]`, found `[{integer}; 2]`
86   |            |
87   |            expected due to this
88   |
89   = note: expected array `[!; 2]`
90              found array `[{integer}; 2]`
91
92error[E0308]: mismatched types
93  --> $DIR/coerce-to-bang.rs:55:22
94   |
95LL |     let x: [!; 2] = [22, return];
96   |                      ^^ expected `!`, found integer
97   |
98   = note: expected type `!`
99              found type `{integer}`
100
101error[E0308]: mismatched types
102  --> $DIR/coerce-to-bang.rs:60:37
103   |
104LL |     let x: (usize, !, usize) = (22, 44, 66);
105   |                                     ^^ expected `!`, found integer
106   |
107   = note: expected type `!`
108              found type `{integer}`
109
110error[E0308]: mismatched types
111  --> $DIR/coerce-to-bang.rs:65:41
112   |
113LL |     let x: (usize, !, usize) = (return, 44, 66);
114   |                                         ^^ expected `!`, found integer
115   |
116   = note: expected type `!`
117              found type `{integer}`
118
119error[E0308]: mismatched types
120  --> $DIR/coerce-to-bang.rs:76:37
121   |
122LL |     let x: (usize, !, usize) = (22, 44, return);
123   |                                     ^^ expected `!`, found integer
124   |
125   = note: expected type `!`
126              found type `{integer}`
127
128error: aborting due to 10 previous errors
129
130For more information about this error, try `rustc --explain E0308`.