Fix tests
This commit is contained in:
parent
8bbb63c600
commit
b721c1a885
@ -3,4 +3,7 @@ static c: char =
|
||||
'●●' //~ ERROR: character literal may only contain one codepoint
|
||||
;
|
||||
|
||||
fn main() {}
|
||||
fn main() {
|
||||
let ch: &str = '●●'; //~ ERROR: character literal may only contain one codepoint
|
||||
//~^ ERROR: mismatched types
|
||||
}
|
||||
|
@ -8,5 +8,25 @@ help: if you meant to write a `str` literal, use double quotes
|
||||
LL | "●●" //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: character literal may only contain one codepoint
|
||||
--> $DIR/lex-bad-char-literals-3.rs:7:20
|
||||
|
|
||||
LL | let ch: &str = '●●'; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
|
|
||||
LL | let ch: &str = "●●"; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/lex-bad-char-literals-3.rs:7:20
|
||||
|
|
||||
LL | let ch: &str = '●●'; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^ expected &str, found char
|
||||
|
|
||||
= note: expected type `&str`
|
||||
found type `char`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -4,4 +4,7 @@ static c: char =
|
||||
'\x10\x10' //~ ERROR: character literal may only contain one codepoint
|
||||
;
|
||||
|
||||
fn main() {}
|
||||
fn main() {
|
||||
let ch: &str = '\x10\x10'; //~ ERROR: character literal may only contain one codepoint
|
||||
//~^ ERROR: mismatched types
|
||||
}
|
||||
|
@ -8,5 +8,25 @@ help: if you meant to write a `str` literal, use double quotes
|
||||
LL | "/x10/x10" //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: character literal may only contain one codepoint
|
||||
--> $DIR/lex-bad-char-literals-5.rs:8:20
|
||||
|
|
||||
LL | let ch: &str = '/x10/x10'; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^^^^^^^
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
|
|
||||
LL | let ch: &str = "/x10/x10"; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/lex-bad-char-literals-5.rs:8:20
|
||||
|
|
||||
LL | let ch: &str = '/x10/x10'; //~ ERROR: character literal may only contain one codepoint
|
||||
| ^^^^^^^^^^ expected &str, found char
|
||||
|
|
||||
= note: expected type `&str`
|
||||
found type `char`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
println!("●●");
|
||||
//~^ ERROR character literal may only contain one codepoint
|
||||
println!("{}", "●●"); //~ ERROR character literal may only contain one codepoint
|
||||
//~^ ERROR format argument must be a string literal
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
// run-rustfix
|
||||
|
||||
fn main() {
|
||||
println!('●●');
|
||||
//~^ ERROR character literal may only contain one codepoint
|
||||
println!('●●'); //~ ERROR character literal may only contain one codepoint
|
||||
//~^ ERROR format argument must be a string literal
|
||||
}
|
||||
|
@ -1,12 +1,22 @@
|
||||
error: character literal may only contain one codepoint
|
||||
--> $DIR/str-as-char.rs:4:14
|
||||
|
|
||||
LL | println!('●●');
|
||||
LL | println!('●●'); //~ ERROR character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
help: if you meant to write a `str` literal, use double quotes
|
||||
|
|
||||
LL | println!("●●");
|
||||
LL | println!("●●"); //~ ERROR character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: format argument must be a string literal
|
||||
--> $DIR/str-as-char.rs:4:14
|
||||
|
|
||||
LL | println!('●●'); //~ ERROR character literal may only contain one codepoint
|
||||
| ^^^^
|
||||
help: you might be missing a string literal to format with
|
||||
|
|
||||
LL | println!("{}", '●●'); //~ ERROR character literal may only contain one codepoint
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user