]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-to-bang.stderr
Auto merge of #102458 - JohnTitor:stabilize-instruction-set, r=oli-obk
[rust.git] / src / test / ui / coercion / coerce-to-bang.stderr
1 error[E0308]: mismatched types
2   --> $DIR/coerce-to-bang.rs:6:17
3    |
4 LL |     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}`
11 note: function defined here
12   --> $DIR/coerce-to-bang.rs:3:4
13    |
14 LL | fn foo(x: usize, y: !, z: usize) { }
15    |    ^^^           ----
16
17 error[E0308]: mismatched types
18   --> $DIR/coerce-to-bang.rs:18:13
19    |
20 LL |     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}`
27 note: function defined here
28   --> $DIR/coerce-to-bang.rs:3:4
29    |
30 LL | fn foo(x: usize, y: !, z: usize) { }
31    |    ^^^           ----
32
33 error[E0308]: mismatched types
34   --> $DIR/coerce-to-bang.rs:26:12
35    |
36 LL |     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}`
43 note: function defined here
44   --> $DIR/coerce-to-bang.rs:3:4
45    |
46 LL | fn foo(x: usize, y: !, z: usize) { }
47    |    ^^^           ----
48
49 error[E0308]: mismatched types
50   --> $DIR/coerce-to-bang.rs:36:12
51    |
52 LL |     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}`
59 note: function defined here
60   --> $DIR/coerce-to-bang.rs:3:4
61    |
62 LL | fn foo(x: usize, y: !, z: usize) { }
63    |    ^^^           ----
64
65 error[E0308]: mismatched types
66   --> $DIR/coerce-to-bang.rs:45:12
67    |
68 LL |     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}`
75 note: function defined here
76   --> $DIR/coerce-to-bang.rs:3:4
77    |
78 LL | fn foo(x: usize, y: !, z: usize) { }
79    |    ^^^           ----
80
81 error[E0308]: mismatched types
82   --> $DIR/coerce-to-bang.rs:50:21
83    |
84 LL |     let x: [!; 2] = [return, 22];
85    |            ------   ^^^^^^^^^^^^ expected `!`, found integer
86    |            |
87    |            expected due to this
88    |
89    = note: expected array `[!; 2]`
90               found array `[{integer}; 2]`
91
92 error[E0308]: mismatched types
93   --> $DIR/coerce-to-bang.rs:55:22
94    |
95 LL |     let x: [!; 2] = [22, return];
96    |                      ^^ expected `!`, found integer
97    |
98    = note: expected type `!`
99               found type `{integer}`
100
101 error[E0308]: mismatched types
102   --> $DIR/coerce-to-bang.rs:60:37
103    |
104 LL |     let x: (usize, !, usize) = (22, 44, 66);
105    |                                     ^^ expected `!`, found integer
106    |
107    = note: expected type `!`
108               found type `{integer}`
109
110 error[E0308]: mismatched types
111   --> $DIR/coerce-to-bang.rs:65:41
112    |
113 LL |     let x: (usize, !, usize) = (return, 44, 66);
114    |                                         ^^ expected `!`, found integer
115    |
116    = note: expected type `!`
117               found type `{integer}`
118
119 error[E0308]: mismatched types
120   --> $DIR/coerce-to-bang.rs:76:37
121    |
122 LL |     let x: (usize, !, usize) = (22, 44, return);
123    |                                     ^^ expected `!`, found integer
124    |
125    = note: expected type `!`
126               found type `{integer}`
127
128 error: aborting due to 10 previous errors
129
130 For more information about this error, try `rustc --explain E0308`.