diff options
Diffstat (limited to 'tests/ui/inference/str-as-char-butchered.stderr')
| -rw-r--r-- | tests/ui/inference/str-as-char-butchered.stderr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/inference/str-as-char-butchered.stderr b/tests/ui/inference/str-as-char-butchered.stderr new file mode 100644 index 00000000000..ad465f979d4 --- /dev/null +++ b/tests/ui/inference/str-as-char-butchered.stderr @@ -0,0 +1,22 @@ +error: expected `while`, `for`, `loop` or `{` after a label + --> $DIR/str-as-char-butchered.rs:4:21 + | +LL | let _: &str = 'β; + | ^ expected `while`, `for`, `loop` or `{` after a label + | +help: add `'` to close the char literal + | +LL | let _: &str = 'β'; + | + + +error[E0308]: mismatched types + --> $DIR/str-as-char-butchered.rs:4:19 + | +LL | let _: &str = 'β; + | ---- ^^ expected `&str`, found `char` + | | + | expected due to this + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. |
