mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
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 = '人';
|
|
| ~~~~
|
|
|
|
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 = '\'';
|
|
| ~~~~
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|