mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
error: character literal may only contain one codepoint
|
|
--> $DIR/lex-bad-char-literals-6.rs:2:19
|
|
|
|
|
LL | let x: &str = 'ab';
|
|
| ^^^^
|
|
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
LL | let x: &str = "ab";
|
|
| ~~~~
|
|
|
|
error: character literal may only contain one codepoint
|
|
--> $DIR/lex-bad-char-literals-6.rs:4:19
|
|
|
|
|
LL | let y: char = 'cd';
|
|
| ^^^^
|
|
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
LL | let y: char = "cd";
|
|
| ~~~~
|
|
|
|
error: character literal may only contain one codepoint
|
|
--> $DIR/lex-bad-char-literals-6.rs:6:13
|
|
|
|
|
LL | let z = 'ef';
|
|
| ^^^^
|
|
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
LL | let z = "ef";
|
|
| ~~~~
|
|
|
|
error[E0308]: mismatched types
|
|
--> $DIR/lex-bad-char-literals-6.rs:13:20
|
|
|
|
|
LL | let a: usize = "";
|
|
| ----- ^^ expected `usize`, found `&str`
|
|
| |
|
|
| expected due to this
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|