]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/type-mismatch-byte-literal.stderr
c9c2e7498d058c7953160e03f43494977bfa6deb
[rust.git] / tests / ui / suggestions / type-mismatch-byte-literal.stderr
1 error[E0308]: mismatched types
2   --> $DIR/type-mismatch-byte-literal.rs:7:18
3    |
4 LL |     let _x: u8 = 'X';
5    |             --   ^^^ expected `u8`, found `char`
6    |             |
7    |             expected due to this
8    |
9 help: if you meant to write a byte literal, prefix with `b`
10    |
11 LL |     let _x: u8 = b'X';
12    |                  ~~~~
13
14 error[E0308]: mismatched types
15   --> $DIR/type-mismatch-byte-literal.rs:11:9
16    |
17 LL |     foo('#');
18    |     --- ^^^ expected `u8`, found `char`
19    |     |
20    |     arguments to this function are incorrect
21    |
22 note: function defined here
23   --> $DIR/type-mismatch-byte-literal.rs:4:4
24    |
25 LL | fn foo(_t: u8) {}
26    |    ^^^ ------
27 help: if you meant to write a byte literal, prefix with `b`
28    |
29 LL |     foo(b'#');
30    |         ~~~~
31
32 error[E0308]: mismatched types
33   --> $DIR/type-mismatch-byte-literal.rs:16:18
34    |
35 LL |     let _t: u8 = '€';
36    |             --   ^^^ expected `u8`, found `char`
37    |             |
38    |             expected due to this
39
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0308`.