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
|
|
|
| ^^^^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2019-04-25 03:48:25 -05: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
|
|
|
| ^^^^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2019-04-25 03:48:25 -05: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
|
|
|
| ^^^^
|
2019-10-24 00:20:58 -05:00
|
|
|
|
|
2019-04-25 03:48:25 -05: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[E0277]: can't compare `&str` with `char`
|
2019-01-19 23:53:28 -06:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:9:10
|
2019-01-19 13:37:58 -06:00
|
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
LL | if x == y {}
|
2019-01-19 13:37:58 -06:00
|
|
|
| ^^ no implementation for `&str == char`
|
|
|
|
|
|
|
|
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-01-19 23:53:28 -06:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:15:20
|
2019-01-19 13:37:58 -06:00
|
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
LL | let a: usize = "";
|
2019-11-15 11:37:01 -06:00
|
|
|
| ^^ expected `usize`, found `&str`
|
2019-01-19 13:37:58 -06:00
|
|
|
|
|
|
|
error[E0277]: can't compare `&str` with `char`
|
2019-01-19 23:53:28 -06:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:12:10
|
2019-01-19 13:37:58 -06:00
|
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
LL | if x == z {}
|
2019-01-19 13:37:58 -06:00
|
|
|
| ^^ no implementation for `&str == char`
|
|
|
|
|
|
|
|
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
|
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
error: aborting due to 6 previous errors
|
2019-01-19 13:37:58 -06:00
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0277, E0308.
|
2019-01-19 13:37:58 -06:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|