fork/rust

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

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

master
5.4 KiB201 linesraw
1error[E0308]: mismatched types
2  --> $DIR/numeric-suffix-usize.rs:29:18
3   |
4LL |     foo::<usize>(42_u64);
5   |     ------------ ^^^^^^ expected `usize`, found `u64`
6   |     |
7   |     arguments to this function are incorrect
8   |
9note: function defined here
10  --> $DIR/numeric-suffix-usize.rs:3:4
11   |
12LL | fn foo<N>(_x: N) {}
13   |    ^^^    -----
14help: change the type of the numeric literal from `u64` to `usize`
15   |
16LL |     foo::<usize>(42_usize);
17   |                     ~~~~~
18
19error[E0308]: mismatched types
20  --> $DIR/numeric-suffix-usize.rs:33:18
21   |
22LL |     foo::<usize>(42_u32);
23   |     ------------ ^^^^^^ expected `usize`, found `u32`
24   |     |
25   |     arguments to this function are incorrect
26   |
27note: function defined here
28  --> $DIR/numeric-suffix-usize.rs:3:4
29   |
30LL | fn foo<N>(_x: N) {}
31   |    ^^^    -----
32help: change the type of the numeric literal from `u32` to `usize`
33   |
34LL |     foo::<usize>(42_usize);
35   |                     ~~~~~
36
37error[E0308]: mismatched types
38  --> $DIR/numeric-suffix-usize.rs:37:18
39   |
40LL |     foo::<usize>(42_u16);
41   |     ------------ ^^^^^^ expected `usize`, found `u16`
42   |     |
43   |     arguments to this function are incorrect
44   |
45note: function defined here
46  --> $DIR/numeric-suffix-usize.rs:3:4
47   |
48LL | fn foo<N>(_x: N) {}
49   |    ^^^    -----
50help: change the type of the numeric literal from `u16` to `usize`
51   |
52LL |     foo::<usize>(42_usize);
53   |                     ~~~~~
54
55error[E0308]: mismatched types
56  --> $DIR/numeric-suffix-usize.rs:41:18
57   |
58LL |     foo::<usize>(42_u8);
59   |     ------------ ^^^^^ expected `usize`, found `u8`
60   |     |
61   |     arguments to this function are incorrect
62   |
63note: function defined here
64  --> $DIR/numeric-suffix-usize.rs:3:4
65   |
66LL | fn foo<N>(_x: N) {}
67   |    ^^^    -----
68help: change the type of the numeric literal from `u8` to `usize`
69   |
70LL |     foo::<usize>(42_usize);
71   |                     ~~~~~
72
73error[E0308]: mismatched types
74  --> $DIR/numeric-suffix-usize.rs:45:18
75   |
76LL |     foo::<usize>(42_isize);
77   |     ------------ ^^^^^^^^ expected `usize`, found `isize`
78   |     |
79   |     arguments to this function are incorrect
80   |
81note: function defined here
82  --> $DIR/numeric-suffix-usize.rs:3:4
83   |
84LL | fn foo<N>(_x: N) {}
85   |    ^^^    -----
86help: change the type of the numeric literal from `isize` to `usize`
87   |
88LL |     foo::<usize>(42_usize);
89   |                     ~~~~~
90
91error[E0308]: mismatched types
92  --> $DIR/numeric-suffix-usize.rs:49:18
93   |
94LL |     foo::<usize>(42_i64);
95   |     ------------ ^^^^^^ expected `usize`, found `i64`
96   |     |
97   |     arguments to this function are incorrect
98   |
99note: function defined here
100  --> $DIR/numeric-suffix-usize.rs:3:4
101   |
102LL | fn foo<N>(_x: N) {}
103   |    ^^^    -----
104help: change the type of the numeric literal from `i64` to `usize`
105   |
106LL |     foo::<usize>(42_usize);
107   |                     ~~~~~
108
109error[E0308]: mismatched types
110  --> $DIR/numeric-suffix-usize.rs:53:18
111   |
112LL |     foo::<usize>(42_i32);
113   |     ------------ ^^^^^^ expected `usize`, found `i32`
114   |     |
115   |     arguments to this function are incorrect
116   |
117note: function defined here
118  --> $DIR/numeric-suffix-usize.rs:3:4
119   |
120LL | fn foo<N>(_x: N) {}
121   |    ^^^    -----
122help: change the type of the numeric literal from `i32` to `usize`
123   |
124LL |     foo::<usize>(42_usize);
125   |                     ~~~~~
126
127error[E0308]: mismatched types
128  --> $DIR/numeric-suffix-usize.rs:57:18
129   |
130LL |     foo::<usize>(42_i16);
131   |     ------------ ^^^^^^ expected `usize`, found `i16`
132   |     |
133   |     arguments to this function are incorrect
134   |
135note: function defined here
136  --> $DIR/numeric-suffix-usize.rs:3:4
137   |
138LL | fn foo<N>(_x: N) {}
139   |    ^^^    -----
140help: change the type of the numeric literal from `i16` to `usize`
141   |
142LL |     foo::<usize>(42_usize);
143   |                     ~~~~~
144
145error[E0308]: mismatched types
146  --> $DIR/numeric-suffix-usize.rs:61:18
147   |
148LL |     foo::<usize>(42_i8);
149   |     ------------ ^^^^^ expected `usize`, found `i8`
150   |     |
151   |     arguments to this function are incorrect
152   |
153note: function defined here
154  --> $DIR/numeric-suffix-usize.rs:3:4
155   |
156LL | fn foo<N>(_x: N) {}
157   |    ^^^    -----
158help: change the type of the numeric literal from `i8` to `usize`
159   |
160LL |     foo::<usize>(42_usize);
161   |                     ~~~~~
162
163error[E0308]: mismatched types
164  --> $DIR/numeric-suffix-usize.rs:65:18
165   |
166LL |     foo::<usize>(42.0_f64);
167   |     ------------ ^^^^^^^^ expected `usize`, found `f64`
168   |     |
169   |     arguments to this function are incorrect
170   |
171note: function defined here
172  --> $DIR/numeric-suffix-usize.rs:3:4
173   |
174LL | fn foo<N>(_x: N) {}
175   |    ^^^    -----
176help: change the type of the numeric literal from `f64` to `usize`
177   |
178LL |     foo::<usize>(42usize);
179   |                    ~~~~~
180
181error[E0308]: mismatched types
182  --> $DIR/numeric-suffix-usize.rs:69:18
183   |
184LL |     foo::<usize>(42.0_f32);
185   |     ------------ ^^^^^^^^ expected `usize`, found `f32`
186   |     |
187   |     arguments to this function are incorrect
188   |
189note: function defined here
190  --> $DIR/numeric-suffix-usize.rs:3:4
191   |
192LL | fn foo<N>(_x: N) {}
193   |    ^^^    -----
194help: change the type of the numeric literal from `f32` to `usize`
195   |
196LL |     foo::<usize>(42usize);
197   |                    ~~~~~
198
199error: aborting due to 11 previous errors
200
201For more information about this error, try `rustc --explain E0308`.