mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Add more tests for raw string literal
This commit is contained in:
parent
30cbdc7491
commit
b825cddb6d
@ -57,4 +57,7 @@ fn main() {
|
||||
// Raw string
|
||||
x.split('a');
|
||||
x.split('a');
|
||||
x.split('a');
|
||||
x.split('\'');
|
||||
x.split('#');
|
||||
}
|
||||
|
@ -57,4 +57,7 @@ fn main() {
|
||||
// Raw string
|
||||
x.split(r"a");
|
||||
x.split(r#"a"#);
|
||||
x.split(r###"a"###);
|
||||
x.split(r###"'"###);
|
||||
x.split(r###"#"###);
|
||||
}
|
||||
|
@ -144,5 +144,23 @@ error: single-character string constant used as pattern
|
||||
LL | x.split(r#"a"#);
|
||||
| ^^^^^^ help: try using a char instead: `'a'`
|
||||
|
||||
error: aborting due to 24 previous errors
|
||||
error: single-character string constant used as pattern
|
||||
--> $DIR/single_char_pattern.rs:60:13
|
||||
|
|
||||
LL | x.split(r###"a"###);
|
||||
| ^^^^^^^^^^ help: try using a char instead: `'a'`
|
||||
|
||||
error: single-character string constant used as pattern
|
||||
--> $DIR/single_char_pattern.rs:61:13
|
||||
|
|
||||
LL | x.split(r###"'"###);
|
||||
| ^^^^^^^^^^ help: try using a char instead: `'/''`
|
||||
|
||||
error: single-character string constant used as pattern
|
||||
--> $DIR/single_char_pattern.rs:62:13
|
||||
|
|
||||
LL | x.split(r###"#"###);
|
||||
| ^^^^^^^^^^ help: try using a char instead: `'#'`
|
||||
|
||||
error: aborting due to 27 previous errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user