2022-10-22 01:37:20 +00:00
|
|
|
error: character literal may only contain one codepoint
|
|
|
|
--> $DIR/str-as-char.rs:8:19
|
|
|
|
|
|
|
|
|
LL | let _: &str = '"""';
|
|
|
|
| ^^^^^
|
|
|
|
|
|
2024-03-13 23:52:04 +00:00
|
|
|
help: if you meant to write a string literal, use double quotes
|
2022-10-22 01:37:20 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = "\"\"\"";
|
|
|
|
| ~~~~~~~~
|
|
|
|
|
|
|
|
error: character literal may only contain one codepoint
|
|
|
|
--> $DIR/str-as-char.rs:9:19
|
|
|
|
|
|
|
|
|
LL | let _: &str = '\"\"\"';
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2024-03-13 23:52:04 +00:00
|
|
|
help: if you meant to write a string literal, use double quotes
|
2022-10-22 01:37:20 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = "\"\"\"";
|
2024-03-09 01:07:23 +00:00
|
|
|
| ~ ~
|
2022-10-22 01:37:20 +00:00
|
|
|
|
2023-05-17 01:54:13 +00:00
|
|
|
error: character literal may only contain one codepoint
|
|
|
|
--> $DIR/str-as-char.rs:10:19
|
|
|
|
|
|
|
|
|
LL | let _: &str = '"\"\"\\"\\"';
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-03-13 23:52:04 +00:00
|
|
|
help: if you meant to write a string literal, use double quotes
|
2023-05-17 01:54:13 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = "\"\"\\"\\"\\\"";
|
|
|
|
| ~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2022-01-01 21:32:04 +00:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/str-as-char.rs:7:19
|
|
|
|
|
|
|
|
|
LL | let _: &str = 'a';
|
|
|
|
| ---- ^^^ expected `&str`, found `char`
|
|
|
|
| |
|
|
|
|
| expected due to this
|
|
|
|
|
|
2024-03-13 23:52:04 +00:00
|
|
|
help: if you meant to write a string literal, use double quotes
|
2022-01-01 21:32:04 +00:00
|
|
|
|
|
|
|
|
LL | let _: &str = "a";
|
2024-03-09 01:07:23 +00:00
|
|
|
| ~ ~
|
2022-01-01 21:32:04 +00:00
|
|
|
|
2023-05-17 01:54:13 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2022-01-01 21:32:04 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|