2022-01-01 15:32:04 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/char-as-str-single.rs:9:19
|
|
|
|
|
|
|
|
|
LL | let _: char = "a";
|
|
|
|
| ---- ^^^ expected `char`, found `&str`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
help: if you meant to write a `char` literal, use single quotes
|
|
|
|
|
|
|
|
|
LL | let _: char = 'a';
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/char-as-str-single.rs:10:19
|
|
|
|
|
|
|
|
|
LL | let _: char = "人";
|
|
|
|
| ---- ^^^^ expected `char`, found `&str`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
help: if you meant to write a `char` literal, use single quotes
|
|
|
|
|
|
|
|
|
LL | let _: char = '人';
|
|
|
|
| ~~~~
|
|
|
|
|
2022-10-21 20:37:20 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/char-as-str-single.rs:11:19
|
|
|
|
|
|
|
|
|
LL | let _: char = "'";
|
|
|
|
| ---- ^^^ expected `char`, found `&str`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
|
|
|
help: if you meant to write a `char` literal, use single quotes
|
|
|
|
|
|
|
|
|
LL | let _: char = '\'';
|
|
|
|
| ~~~~
|
|
|
|
|
2023-03-25 16:27:24 -05:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/char-as-str-single.rs:18:9
|
|
|
|
|
|
|
|
|
LL | match c {
|
|
|
|
| - this expression has type `char`
|
|
|
|
LL | "A" => {}
|
|
|
|
| ^^^ expected `char`, found `&str`
|
|
|
|
|
|
|
|
|
help: if you meant to write a `char` literal, use single quotes
|
|
|
|
|
|
|
|
|
LL | 'A' => {}
|
|
|
|
| ~~~
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2022-01-01 15:32:04 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|