2019-01-20 04:37:58 +09:00
|
|
|
error: character literal may only contain one codepoint
|
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:2:19
|
|
|
|
|
|
2019-01-20 14:53:28 +09:00
|
|
|
LL | let x: &str = 'ab';
|
2019-01-20 04:37:58 +09:00
|
|
|
| ^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-04-25 11:48:25 +03:00
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
|
|
|
|
LL | let x: &str = "ab";
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~~~
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
|
|
error: character literal may only contain one codepoint
|
2019-01-20 14:53:28 +09:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:4:19
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
2019-01-20 14:53:28 +09:00
|
|
|
LL | let y: char = 'cd';
|
2019-01-20 04:37:58 +09:00
|
|
|
| ^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-04-25 11:48:25 +03:00
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
|
|
|
|
LL | let y: char = "cd";
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~~~
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
|
|
error: character literal may only contain one codepoint
|
2019-01-20 14:53:28 +09:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:6:13
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
2019-01-20 14:53:28 +09:00
|
|
|
LL | let z = 'ef';
|
2019-01-20 04:37:58 +09:00
|
|
|
| ^^^^
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2019-04-25 11:48:25 +03:00
|
|
|
help: if you meant to write a `str` literal, use double quotes
|
|
|
|
|
|
|
|
|
LL | let z = "ef";
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~~~
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2022-12-27 17:57:39 -08:00
|
|
|
--> $DIR/lex-bad-char-literals-6.rs:13:20
|
2019-01-20 04:37:58 +09:00
|
|
|
|
|
2019-01-20 14:53:28 +09:00
|
|
|
LL | let a: usize = "";
|
2019-11-18 21:00:24 -08:00
|
|
|
| ----- ^^ expected `usize`, found `&str`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2019-01-20 04:37:58 +09:00
|
|
|
|
2022-12-27 17:57:39 -08:00
|
|
|
error: aborting due to 4 previous errors
|
2019-01-20 04:37:58 +09:00
|
|
|
|
2022-12-27 17:57:39 -08:00
|
|
|
For more information about this error, try `rustc --explain E0308`.
|