1 error[E0308]: mismatched types
2 --> $DIR/cast-int-to-char.rs:4:16
5 | ---------- ^^^ expected `u32`, found `char`
7 | arguments to this function are incorrect
9 note: function defined here
10 --> $DIR/cast-int-to-char.rs:1:4
12 LL | fn foo<T>(_t: T) {}
14 help: you can cast a `char` to a `u32`, since a `char` always occupies 4 bytes
16 LL | foo::<u32>('0' as u32);
19 error[E0308]: mismatched types
20 --> $DIR/cast-int-to-char.rs:5:16
23 | ---------- ^^^ expected `i32`, found `char`
25 | arguments to this function are incorrect
27 note: function defined here
28 --> $DIR/cast-int-to-char.rs:1:4
30 LL | fn foo<T>(_t: T) {}
32 help: you can cast a `char` to an `i32`, since a `char` always occupies 4 bytes
34 LL | foo::<i32>('0' as i32);
37 error[E0308]: mismatched types
38 --> $DIR/cast-int-to-char.rs:6:16
41 | ---------- ^^^ expected `u64`, found `char`
43 | arguments to this function are incorrect
45 note: function defined here
46 --> $DIR/cast-int-to-char.rs:1:4
48 LL | fn foo<T>(_t: T) {}
50 help: you can cast a `char` to a `u64`, since a `char` always occupies 4 bytes
52 LL | foo::<u64>('0' as u64);
55 error[E0308]: mismatched types
56 --> $DIR/cast-int-to-char.rs:7:16
59 | ---------- ^^^ expected `i64`, found `char`
61 | arguments to this function are incorrect
63 note: function defined here
64 --> $DIR/cast-int-to-char.rs:1:4
66 LL | fn foo<T>(_t: T) {}
68 help: you can cast a `char` to an `i64`, since a `char` always occupies 4 bytes
70 LL | foo::<i64>('0' as i64);
73 error[E0308]: mismatched types
74 --> $DIR/cast-int-to-char.rs:8:17
76 LL | foo::<char>(0u32);
77 | ----------- ^^^^ expected `char`, found `u32`
79 | arguments to this function are incorrect
81 note: function defined here
82 --> $DIR/cast-int-to-char.rs:1:4
84 LL | fn foo<T>(_t: T) {}
87 error: aborting due to 5 previous errors
89 For more information about this error, try `rustc --explain E0308`.