rust/tests/ui/lexer/lex-bad-char-literals-6.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2019-01-19 13:37:58 -06:00
error: character literal may only contain one codepoint
--> $DIR/lex-bad-char-literals-6.rs:2:19
|
2019-01-19 23:53:28 -06:00
LL | let x: &str = 'ab';
2019-01-19 13:37:58 -06:00
| ^^^^
|
help: if you meant to write a `str` literal, use double quotes
|
LL | let x: &str = "ab";
| ~~~~
2019-01-19 13:37:58 -06:00
error: character literal may only contain one codepoint
2019-01-19 23:53:28 -06:00
--> $DIR/lex-bad-char-literals-6.rs:4:19
2019-01-19 13:37:58 -06:00
|
2019-01-19 23:53:28 -06:00
LL | let y: char = 'cd';
2019-01-19 13:37:58 -06:00
| ^^^^
|
help: if you meant to write a `str` literal, use double quotes
|
LL | let y: char = "cd";
| ~~~~
2019-01-19 13:37:58 -06:00
error: character literal may only contain one codepoint
2019-01-19 23:53:28 -06:00
--> $DIR/lex-bad-char-literals-6.rs:6:13
2019-01-19 13:37:58 -06:00
|
2019-01-19 23:53:28 -06:00
LL | let z = 'ef';
2019-01-19 13:37:58 -06:00
| ^^^^
|
help: if you meant to write a `str` literal, use double quotes
|
LL | let z = "ef";
| ~~~~
2019-01-19 13:37:58 -06:00
error[E0308]: mismatched types
--> $DIR/lex-bad-char-literals-6.rs:13:20
2019-01-19 13:37:58 -06:00
|
2019-01-19 23:53:28 -06:00
LL | let a: usize = "";
| ----- ^^ expected `usize`, found `&str`
| |
| expected due to this
2019-01-19 13:37:58 -06:00
error: aborting due to 4 previous errors
2019-01-19 13:37:58 -06:00
For more information about this error, try `rustc --explain E0308`.