rust/tests/ui/inference/str-as-char.stderr

39 lines
1.0 KiB
Plaintext
Raw Normal View History

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