|
LL | let x: &str = 'ab';
| ^^^^
+ |
help: if you meant to write a `str` literal, use double quotes
|
LL | let x: &str = "ab";
|
LL | let y: char = 'cd';
| ^^^^
+ |
help: if you meant to write a `str` literal, use double quotes
|
LL | let y: char = "cd";
|
LL | let z = 'ef';
| ^^^^
+ |
help: if you meant to write a `str` literal, use double quotes
|
LL | let z = "ef";
| ^^ no implementation for `&str == char`
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
- = note: `std::cmp::PartialEq<char>` is implemented for `&mut 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`
+ | ^^ expected usize, found &str
error[E0277]: can't compare `&str` with `char`
--> $DIR/lex-bad-char-literals-6.rs:12:10
| ^^ no implementation for `&str == char`
|
= help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str`
- = note: `std::cmp::PartialEq<char>` is implemented for `&mut str`
error: aborting due to 6 previous errors