]> git.lizzy.rs Git - rust.git/blob - src/test/ui/cast/cast-int-to-char.stderr
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / cast / cast-int-to-char.stderr
1 error[E0308]: mismatched types
2   --> $DIR/cast-int-to-char.rs:4:16
3    |
4 LL |     foo::<u32>('0');
5    |                ^^^ expected `u32`, found `char`
6    |
7 help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes
8    |
9 LL |     foo::<u32>('0' as u32);
10    |                    ++++++
11
12 error[E0308]: mismatched types
13   --> $DIR/cast-int-to-char.rs:5:16
14    |
15 LL |     foo::<i32>('0');
16    |                ^^^ expected `i32`, found `char`
17    |
18 help: you can cast a `char` to an `i32`, since a `char` always occupies 4 bytes
19    |
20 LL |     foo::<i32>('0' as i32);
21    |                    ++++++
22
23 error[E0308]: mismatched types
24   --> $DIR/cast-int-to-char.rs:6:16
25    |
26 LL |     foo::<u64>('0');
27    |                ^^^ expected `u64`, found `char`
28    |
29 help: you can cast a `char` to a `u64`, since a `char` always occupies 4 bytes
30    |
31 LL |     foo::<u64>('0' as u64);
32    |                    ++++++
33
34 error[E0308]: mismatched types
35   --> $DIR/cast-int-to-char.rs:7:16
36    |
37 LL |     foo::<i64>('0');
38    |                ^^^ expected `i64`, found `char`
39    |
40 help: you can cast a `char` to an `i64`, since a `char` always occupies 4 bytes
41    |
42 LL |     foo::<i64>('0' as i64);
43    |                    ++++++
44
45 error[E0308]: mismatched types
46   --> $DIR/cast-int-to-char.rs:8:17
47    |
48 LL |     foo::<char>(0u32);
49    |                 ^^^^ expected `char`, found `u32`
50
51 error: aborting due to 5 previous errors
52
53 For more information about this error, try `rustc --explain E0308`.