1
Fork 0

Fix tests

This commit is contained in:
Yuki Okushi 2019-01-16 09:28:26 +09:00
parent ec8db2a944
commit d33ee3fefa
4 changed files with 2 additions and 24 deletions

View file

@ -1,7 +1,6 @@
// This test needs to the last one appearing in this file as it kills the parser // This test needs to the last one appearing in this file as it kills the parser
static c: char = static c: char =
'' //~ ERROR: character literal may only contain one codepoint '' //~ ERROR: character literal may only contain one codepoint
//~| ERROR: mismatched types
; ;
fn main() {} fn main() {}

View file

@ -8,15 +8,5 @@ help: if you meant to write a `str` literal, use double quotes
LL | "●●" //~ ERROR: character literal may only contain one codepoint LL | "●●" //~ ERROR: character literal may only contain one codepoint
| ^^^^ | ^^^^
error[E0308]: mismatched types error: aborting due to previous error
--> $DIR/lex-bad-char-literals-3.rs:3:5
|
LL | '●●' //~ ERROR: character literal may only contain one codepoint
| ^^^^ expected char, found reference
|
= note: expected type `char`
found type `&'static str`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.

View file

@ -2,7 +2,6 @@
// This test needs to the last one appearing in this file as it kills the parser // This test needs to the last one appearing in this file as it kills the parser
static c: char = static c: char =
'\x10\x10' //~ ERROR: character literal may only contain one codepoint '\x10\x10' //~ ERROR: character literal may only contain one codepoint
//~| ERROR: mismatched types
; ;
fn main() {} fn main() {}

View file

@ -8,15 +8,5 @@ help: if you meant to write a `str` literal, use double quotes
LL | "/x10/x10" //~ ERROR: character literal may only contain one codepoint LL | "/x10/x10" //~ ERROR: character literal may only contain one codepoint
| ^^^^^^^^^^ | ^^^^^^^^^^
error[E0308]: mismatched types error: aborting due to previous error
--> $DIR/lex-bad-char-literals-5.rs:4:5
|
LL | '/x10/x10' //~ ERROR: character literal may only contain one codepoint
| ^^^^^^^^^^ expected char, found reference
|
= note: expected type `char`
found type `&'static str`
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.