diff options
Diffstat (limited to 'tests/ui/lexer/lex-bad-char-literals-6.stderr')
-rw-r--r-- | tests/ui/lexer/lex-bad-char-literals-6.stderr | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/ui/lexer/lex-bad-char-literals-6.stderr b/tests/ui/lexer/lex-bad-char-literals-6.stderr new file mode 100644 index 000000000..2fe30304a --- /dev/null +++ b/tests/ui/lexer/lex-bad-char-literals-6.stderr @@ -0,0 +1,44 @@ +error: character literal may only contain one codepoint + --> $DIR/lex-bad-char-literals-6.rs:2:19 + | +LL | let x: &str = 'ab'; + | ^^^^ + | +help: if you meant to write a `str` literal, use double quotes + | +LL | let x: &str = "ab"; + | ~~~~ + +error: character literal may only contain one codepoint + --> $DIR/lex-bad-char-literals-6.rs:4:19 + | +LL | let y: char = 'cd'; + | ^^^^ + | +help: if you meant to write a `str` literal, use double quotes + | +LL | let y: char = "cd"; + | ~~~~ + +error: character literal may only contain one codepoint + --> $DIR/lex-bad-char-literals-6.rs:6:13 + | +LL | let z = 'ef'; + | ^^^^ + | +help: if you meant to write a `str` literal, use double quotes + | +LL | let z = "ef"; + | ~~~~ + +error[E0308]: mismatched types + --> $DIR/lex-bad-char-literals-6.rs:13:20 + | +LL | let a: usize = ""; + | ----- ^^ expected `usize`, found `&str` + | | + | expected due to this + +error: aborting due to 4 previous errors + +For more information about this error, try `rustc --explain E0308`. |