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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
1.1 KiB
Plaintext
Raw Normal View History

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