]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/char-as-str-single.stderr
Auto merge of #107021 - matthiaskrgr:rollup-0dzxfyi, r=matthiaskrgr
[rust.git] / tests / ui / inference / char-as-str-single.stderr
1 error[E0308]: mismatched types
2   --> $DIR/char-as-str-single.rs:9:19
3    |
4 LL |     let _: char = "a";
5    |            ----   ^^^ expected `char`, found `&str`
6    |            |
7    |            expected due to this
8    |
9 help: if you meant to write a `char` literal, use single quotes
10    |
11 LL |     let _: char = 'a';
12    |                   ~~~
13
14 error[E0308]: mismatched types
15   --> $DIR/char-as-str-single.rs:10:19
16    |
17 LL |     let _: char = "人";
18    |            ----   ^^^^ expected `char`, found `&str`
19    |            |
20    |            expected due to this
21    |
22 help: if you meant to write a `char` literal, use single quotes
23    |
24 LL |     let _: char = '人';
25    |                   ~~~~
26
27 error[E0308]: mismatched types
28   --> $DIR/char-as-str-single.rs:11:19
29    |
30 LL |     let _: char = "'";
31    |            ----   ^^^ expected `char`, found `&str`
32    |            |
33    |            expected due to this
34    |
35 help: if you meant to write a `char` literal, use single quotes
36    |
37 LL |     let _: char = '\'';
38    |                   ~~~~
39
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0308`.