blob: df99726034878d464a6bb9fe3008563feab7a550 [file] [log] [blame]
error: character literal may only contain one codepoint
--> $DIR/lex-bad-char-literals-6.rs:2:19
|
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';
| ^^^^
error: character literal may only contain one codepoint
--> $DIR/lex-bad-char-literals-6.rs:6:13
|
LL | let z = 'ef';
| ^^^^
error[E0277]: can't compare `&str` with `char`
--> $DIR/lex-bad-char-literals-6.rs:9:10
|
LL | if x == y {}
| ^^ no implementation for `&str == char`
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
error[E0308]: mismatched types
--> $DIR/lex-bad-char-literals-6.rs:15:20
|
LL | let a: usize = "";
| ^^ expected usize, found reference
|
= note: expected type `usize`
found type `&'static str`
error[E0277]: can't compare `&str` with `char`
--> $DIR/lex-bad-char-literals-6.rs:12:10
|
LL | if x == z {}
| ^^ no implementation for `&str == char`
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
error: aborting due to 6 previous errors
Some errors occurred: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.