rust/tests/ui/lexer/lex-bad-char-literals-6.stderr
2024-03-17 23:35:18 +00:00

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 string 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 string 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 string 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`.