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";
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~
|
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";
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~
|
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";
|
2021-06-21 21:07:19 -05:00
|
|
|
| ~~~~
|
2019-01-19 13:37:58 -06:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-12-27 19:57:39 -06:00
|
|
|
--> $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 = "";
|
2019-11-18 23:00:24 -06:00
|
|
|
| ----- ^^ expected `usize`, found `&str`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2019-01-19 13:37:58 -06:00
|
|
|
|
2022-12-27 19:57:39 -06:00
|
|
|
error: aborting due to 4 previous errors
|
2019-01-19 13:37:58 -06:00
|
|
|
|
2022-12-27 19:57:39 -06:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|