diff options
| author | Caio <c410.f3r@gmail.com> | 2021-11-19 07:18:00 -0300 |
|---|---|---|
| committer | Caio <c410.f3r@gmail.com> | 2021-11-25 08:11:01 -0300 |
| commit | 062abf3d217788682aefdd2343eafa694af971bb (patch) | |
| tree | 5d6bb4f361aad83ebad71cf5f110c59d3a3f2e44 /src/test/ui/parser | |
| parent | c6eda7d8a7af3ef51311d3106874a7d8de994edc (diff) | |
| download | rust-062abf3d217788682aefdd2343eafa694af971bb.tar.gz rust-062abf3d217788682aefdd2343eafa694af971bb.zip | |
Move some tests to more reasonable directories
Diffstat (limited to 'src/test/ui/parser')
28 files changed, 0 insertions, 648 deletions
diff --git a/src/test/ui/parser/lex-bad-binary-literal.rs b/src/test/ui/parser/lex-bad-binary-literal.rs deleted file mode 100644 index 7df98073e35..00000000000 --- a/src/test/ui/parser/lex-bad-binary-literal.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn main() { - 0b121; //~ ERROR invalid digit for a base 2 literal - 0b10_10301; //~ ERROR invalid digit for a base 2 literal - 0b30; //~ ERROR invalid digit for a base 2 literal - 0b41; //~ ERROR invalid digit for a base 2 literal - 0b5; //~ ERROR invalid digit for a base 2 literal - 0b6; //~ ERROR invalid digit for a base 2 literal - 0b7; //~ ERROR invalid digit for a base 2 literal - 0b8; //~ ERROR invalid digit for a base 2 literal - 0b9; //~ ERROR invalid digit for a base 2 literal -} diff --git a/src/test/ui/parser/lex-bad-binary-literal.stderr b/src/test/ui/parser/lex-bad-binary-literal.stderr deleted file mode 100644 index 992b3d2487e..00000000000 --- a/src/test/ui/parser/lex-bad-binary-literal.stderr +++ /dev/null @@ -1,56 +0,0 @@ -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:2:8 - | -LL | 0b121; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:3:12 - | -LL | 0b10_10301; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:4:7 - | -LL | 0b30; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:5:7 - | -LL | 0b41; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:6:7 - | -LL | 0b5; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:7:7 - | -LL | 0b6; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:8:7 - | -LL | 0b7; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:9:7 - | -LL | 0b8; - | ^ - -error: invalid digit for a base 2 literal - --> $DIR/lex-bad-binary-literal.rs:10:7 - | -LL | 0b9; - | ^ - -error: aborting due to 9 previous errors - diff --git a/src/test/ui/parser/lex-bad-char-literals-1.rs b/src/test/ui/parser/lex-bad-char-literals-1.rs deleted file mode 100644 index e7951cfd2d2..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-1.rs +++ /dev/null @@ -1,17 +0,0 @@ -static c3: char = - '\x1' //~ ERROR: numeric character escape is too short -; - -static s3: &'static str = - "\x1" //~ ERROR: numeric character escape is too short -; - -static c: char = - '\●' //~ ERROR: unknown character escape -; - -static s: &'static str = - "\●" //~ ERROR: unknown character escape -; - -fn main() {} diff --git a/src/test/ui/parser/lex-bad-char-literals-1.stderr b/src/test/ui/parser/lex-bad-char-literals-1.stderr deleted file mode 100644 index ed129a1d133..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-1.stderr +++ /dev/null @@ -1,30 +0,0 @@ -error: numeric character escape is too short - --> $DIR/lex-bad-char-literals-1.rs:2:6 - | -LL | '\x1' - | ^^^ - -error: numeric character escape is too short - --> $DIR/lex-bad-char-literals-1.rs:6:6 - | -LL | "\x1" - | ^^^ - -error: unknown character escape: `\u{25cf}` - --> $DIR/lex-bad-char-literals-1.rs:10:7 - | -LL | '\●' - | ^ unknown character escape - | - = help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals> - -error: unknown character escape: `\u{25cf}` - --> $DIR/lex-bad-char-literals-1.rs:14:7 - | -LL | "\●" - | ^ unknown character escape - | - = help: for more information, visit <https://static.rust-lang.org/doc/master/reference.html#literals> - -error: aborting due to 4 previous errors - diff --git a/src/test/ui/parser/lex-bad-char-literals-2.rs b/src/test/ui/parser/lex-bad-char-literals-2.rs deleted file mode 100644 index d35dafd9a34..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-2.rs +++ /dev/null @@ -1,6 +0,0 @@ -// This test needs to the last one appearing in this file as it kills the parser -static c: char = - 'nope' //~ ERROR: character literal may only contain one codepoint -; - -fn main() {} diff --git a/src/test/ui/parser/lex-bad-char-literals-2.stderr b/src/test/ui/parser/lex-bad-char-literals-2.stderr deleted file mode 100644 index c2b19a7ad5f..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-2.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: character literal may only contain one codepoint - --> $DIR/lex-bad-char-literals-2.rs:3:5 - | -LL | 'nope' - | ^^^^^^ - | -help: if you meant to write a `str` literal, use double quotes - | -LL | "nope" - | ~~~~~~ - -error: aborting due to previous error - diff --git a/src/test/ui/parser/lex-bad-char-literals-3.rs b/src/test/ui/parser/lex-bad-char-literals-3.rs deleted file mode 100644 index 5194ff4d935..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-3.rs +++ /dev/null @@ -1,7 +0,0 @@ -static c: char = '●●'; -//~^ ERROR: character literal may only contain one codepoint - -fn main() { - let ch: &str = '●●'; - //~^ ERROR: character literal may only contain one codepoint -} diff --git a/src/test/ui/parser/lex-bad-char-literals-3.stderr b/src/test/ui/parser/lex-bad-char-literals-3.stderr deleted file mode 100644 index 62a5e424cb4..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-3.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error: character literal may only contain one codepoint - --> $DIR/lex-bad-char-literals-3.rs:1:18 - | -LL | static c: char = '●●'; - | ^^^^ - | -help: if you meant to write a `str` literal, use double quotes - | -LL | static c: char = "●●"; - | ~~~~ - -error: character literal may only contain one codepoint - --> $DIR/lex-bad-char-literals-3.rs:5:20 - | -LL | let ch: &str = '●●'; - | ^^^^ - | -help: if you meant to write a `str` literal, use double quotes - | -LL | let ch: &str = "●●"; - | ~~~~ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/parser/lex-bad-char-literals-4.rs b/src/test/ui/parser/lex-bad-char-literals-4.rs deleted file mode 100644 index de0a19df993..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-4.rs +++ /dev/null @@ -1,5 +0,0 @@ -// -// This test needs to the last one appearing in this file as it kills the parser -static c: char = - '● //~ ERROR: unterminated character literal -; diff --git a/src/test/ui/parser/lex-bad-char-literals-4.stderr b/src/test/ui/parser/lex-bad-char-literals-4.stderr deleted file mode 100644 index fec4421c48a..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-4.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0762]: unterminated character literal - --> $DIR/lex-bad-char-literals-4.rs:4:5 - | -LL | '● - | ^^^^ - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0762`. diff --git a/src/test/ui/parser/lex-bad-char-literals-5.rs b/src/test/ui/parser/lex-bad-char-literals-5.rs deleted file mode 100644 index 0c4339edc4f..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-5.rs +++ /dev/null @@ -1,7 +0,0 @@ -static c: char = '\x10\x10'; -//~^ ERROR: character literal may only contain one codepoint - -fn main() { - let ch: &str = '\x10\x10'; - //~^ ERROR: character literal may only contain one codepoint -} diff --git a/src/test/ui/parser/lex-bad-char-literals-5.stderr b/src/test/ui/parser/lex-bad-char-literals-5.stderr deleted file mode 100644 index 184817a6579..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-5.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error: character literal may only contain one codepoint - --> $DIR/lex-bad-char-literals-5.rs:1:18 - | -LL | static c: char = '\x10\x10'; - | ^^^^^^^^^^ - | -help: if you meant to write a `str` literal, use double quotes - | -LL | static c: char = "\x10\x10"; - | ~~~~~~~~~~ - -error: character literal may only contain one codepoint - --> $DIR/lex-bad-char-literals-5.rs:5:20 - | -LL | let ch: &str = '\x10\x10'; - | ^^^^^^^^^^ - | -help: if you meant to write a `str` literal, use double quotes - | -LL | let ch: &str = "\x10\x10"; - | ~~~~~~~~~~ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/parser/lex-bad-char-literals-6.rs b/src/test/ui/parser/lex-bad-char-literals-6.rs deleted file mode 100644 index 4379b4fa6d7..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-6.rs +++ /dev/null @@ -1,17 +0,0 @@ -fn main() { - let x: &str = 'ab'; - //~^ ERROR: character literal may only contain one codepoint - let y: char = 'cd'; - //~^ ERROR: character literal may only contain one codepoint - let z = 'ef'; - //~^ ERROR: character literal may only contain one codepoint - - if x == y {} - //~^ ERROR: can't compare `&str` with `char` - if y == z {} // no error here - if x == z {} - //~^ ERROR: can't compare `&str` with `char` - - let a: usize = ""; - //~^ ERROR: mismatched types -} diff --git a/src/test/ui/parser/lex-bad-char-literals-6.stderr b/src/test/ui/parser/lex-bad-char-literals-6.stderr deleted file mode 100644 index 4332bdefcb2..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-6.stderr +++ /dev/null @@ -1,61 +0,0 @@ -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[E0277]: can't compare `&str` with `char` - --> $DIR/lex-bad-char-literals-6.rs:9:10 - | -LL | if x == y {} - | ^^ no implementation for `&str == char` - | - = help: the trait `PartialEq<char>` is not implemented for `&str` - -error[E0308]: mismatched types - --> $DIR/lex-bad-char-literals-6.rs:15:20 - | -LL | let a: usize = ""; - | ----- ^^ expected `usize`, found `&str` - | | - | expected due to this - -error[E0277]: can't compare `&str` with `char` - --> $DIR/lex-bad-char-literals-6.rs:12:10 - | -LL | if x == z {} - | ^^ no implementation for `&str == char` - | - = help: the trait `PartialEq<char>` is not implemented for `&str` - -error: aborting due to 6 previous errors - -Some errors have detailed explanations: E0277, E0308. -For more information about an error, try `rustc --explain E0277`. diff --git a/src/test/ui/parser/lex-bad-char-literals-7.rs b/src/test/ui/parser/lex-bad-char-literals-7.rs deleted file mode 100644 index c675df2f3cc..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-7.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn main() { - let _: char = ''; - //~^ ERROR: empty character literal - let _: char = '\u{}'; - //~^ ERROR: empty unicode escape - - // Next two are OK, but may befool error recovery - let _ = '/'; - let _ = b'/'; - - let _ = ' hello // here's a comment - //~^ ERROR: unterminated character literal -} diff --git a/src/test/ui/parser/lex-bad-char-literals-7.stderr b/src/test/ui/parser/lex-bad-char-literals-7.stderr deleted file mode 100644 index 255b9c68999..00000000000 --- a/src/test/ui/parser/lex-bad-char-literals-7.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error: empty character literal - --> $DIR/lex-bad-char-literals-7.rs:2:20 - | -LL | let _: char = ''; - | ^ empty character literal - -error: empty unicode escape - --> $DIR/lex-bad-char-literals-7.rs:4:20 - | -LL | let _: char = '\u{}'; - | ^^^^ this escape must have at least 1 hex digit - -error[E0762]: unterminated character literal - --> $DIR/lex-bad-char-literals-7.rs:11:13 - | -LL | let _ = ' hello // here's a comment - | ^^^^^^^^ - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0762`. diff --git a/src/test/ui/parser/lex-bad-numeric-literals.rs b/src/test/ui/parser/lex-bad-numeric-literals.rs deleted file mode 100644 index cf8440ca488..00000000000 --- a/src/test/ui/parser/lex-bad-numeric-literals.rs +++ /dev/null @@ -1,27 +0,0 @@ -fn main() { - 0o1.0; //~ ERROR: octal float literal is not supported - 0o2f32; //~ ERROR: octal float literal is not supported - 0o3.0f32; //~ ERROR: octal float literal is not supported - 0o4e4; //~ ERROR: octal float literal is not supported - 0o5.0e5; //~ ERROR: octal float literal is not supported - 0o6e6f32; //~ ERROR: octal float literal is not supported - 0o7.0e7f64; //~ ERROR: octal float literal is not supported - 0x8.0e+9; //~ ERROR: hexadecimal float literal is not supported - 0x9.0e-9; //~ ERROR: hexadecimal float literal is not supported - 0o; //~ ERROR: no valid digits - 1e+; //~ ERROR: expected at least one digit in exponent - 0x539.0; //~ ERROR: hexadecimal float literal is not supported - 9900000000000000000000000000999999999999999999999999999999; - //~^ ERROR: integer literal is too large - 9900000000000000000000000000999999999999999999999999999999; - //~^ ERROR: integer literal is too large - 0x; //~ ERROR: no valid digits - 0xu32; //~ ERROR: no valid digits - 0ou32; //~ ERROR: no valid digits - 0bu32; //~ ERROR: no valid digits - 0b; //~ ERROR: no valid digits - 0o123f64; //~ ERROR: octal float literal is not supported - 0o123.456; //~ ERROR: octal float literal is not supported - 0b101f64; //~ ERROR: binary float literal is not supported - 0b111.101; //~ ERROR: binary float literal is not supported -} diff --git a/src/test/ui/parser/lex-bad-numeric-literals.stderr b/src/test/ui/parser/lex-bad-numeric-literals.stderr deleted file mode 100644 index f05d6160302..00000000000 --- a/src/test/ui/parser/lex-bad-numeric-literals.stderr +++ /dev/null @@ -1,141 +0,0 @@ -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:2:5 - | -LL | 0o1.0; - | ^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:4:5 - | -LL | 0o3.0f32; - | ^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:5:5 - | -LL | 0o4e4; - | ^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:6:5 - | -LL | 0o5.0e5; - | ^^^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:7:5 - | -LL | 0o6e6f32; - | ^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:8:5 - | -LL | 0o7.0e7f64; - | ^^^^^^^ - -error: hexadecimal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:9:5 - | -LL | 0x8.0e+9; - | ^^^^^^^^ - -error: hexadecimal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:10:5 - | -LL | 0x9.0e-9; - | ^^^^^^^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:11:5 - | -LL | 0o; - | ^^ - -error: expected at least one digit in exponent - --> $DIR/lex-bad-numeric-literals.rs:12:5 - | -LL | 1e+; - | ^^^ - -error: hexadecimal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:13:5 - | -LL | 0x539.0; - | ^^^^^^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:18:5 - | -LL | 0x; - | ^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:19:5 - | -LL | 0xu32; - | ^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:20:5 - | -LL | 0ou32; - | ^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:21:5 - | -LL | 0bu32; - | ^^ - -error[E0768]: no valid digits found for number - --> $DIR/lex-bad-numeric-literals.rs:22:5 - | -LL | 0b; - | ^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:24:5 - | -LL | 0o123.456; - | ^^^^^^^^^ - -error: binary float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:26:5 - | -LL | 0b111.101; - | ^^^^^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:3:5 - | -LL | 0o2f32; - | ^^^^^^ not supported - -error: integer literal is too large - --> $DIR/lex-bad-numeric-literals.rs:14:5 - | -LL | 9900000000000000000000000000999999999999999999999999999999; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: integer literal is too large - --> $DIR/lex-bad-numeric-literals.rs:16:5 - | -LL | 9900000000000000000000000000999999999999999999999999999999; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: octal float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:23:5 - | -LL | 0o123f64; - | ^^^^^^^^ not supported - -error: binary float literal is not supported - --> $DIR/lex-bad-numeric-literals.rs:25:5 - | -LL | 0b101f64; - | ^^^^^^^^ not supported - -error: aborting due to 23 previous errors - -For more information about this error, try `rustc --explain E0768`. diff --git a/src/test/ui/parser/lex-bad-octal-literal.rs b/src/test/ui/parser/lex-bad-octal-literal.rs deleted file mode 100644 index 49631f16bdb..00000000000 --- a/src/test/ui/parser/lex-bad-octal-literal.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - 0o18; //~ ERROR invalid digit for a base 8 literal - 0o1234_9_5670; //~ ERROR invalid digit for a base 8 literal -} diff --git a/src/test/ui/parser/lex-bad-octal-literal.stderr b/src/test/ui/parser/lex-bad-octal-literal.stderr deleted file mode 100644 index 2cb8ca5ded0..00000000000 --- a/src/test/ui/parser/lex-bad-octal-literal.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: invalid digit for a base 8 literal - --> $DIR/lex-bad-octal-literal.rs:2:8 - | -LL | 0o18; - | ^ - -error: invalid digit for a base 8 literal - --> $DIR/lex-bad-octal-literal.rs:3:12 - | -LL | 0o1234_9_5670; - | ^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/parser/lex-bad-token.rs b/src/test/ui/parser/lex-bad-token.rs deleted file mode 100644 index 9e482461112..00000000000 --- a/src/test/ui/parser/lex-bad-token.rs +++ /dev/null @@ -1,3 +0,0 @@ -● //~ ERROR: unknown start of token - -fn main() {} diff --git a/src/test/ui/parser/lex-bad-token.stderr b/src/test/ui/parser/lex-bad-token.stderr deleted file mode 100644 index 43c43721b19..00000000000 --- a/src/test/ui/parser/lex-bad-token.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: unknown start of token: \u{25cf} - --> $DIR/lex-bad-token.rs:1:1 - | -LL | ● - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/parser/lex-bare-cr-nondoc-comment.rs b/src/test/ui/parser/lex-bare-cr-nondoc-comment.rs deleted file mode 100644 index 5b528d6e1e1..00000000000 --- a/src/test/ui/parser/lex-bare-cr-nondoc-comment.rs +++ /dev/null @@ -1,9 +0,0 @@ -// run-pass -// ignore-tidy-cr - -// nondoc comment with bare CR: ' ' -//// nondoc comment with bare CR: ' ' -/* block nondoc comment with bare CR: ' ' */ - -fn main() { -} diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs deleted file mode 100644 index b7752e1f0c4..00000000000 --- a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.rs +++ /dev/null @@ -1,26 +0,0 @@ -// ignore-tidy-cr - -/// doc comment with bare CR: ' ' -pub fn foo() {} -//~^^ ERROR: bare CR not allowed in doc-comment - -/** block doc comment with bare CR: ' ' */ -pub fn bar() {} -//~^^ ERROR: bare CR not allowed in block doc-comment - -fn main() { - //! doc comment with bare CR: ' ' - //~^ ERROR: bare CR not allowed in doc-comment - - /*! block doc comment with bare CR: ' ' */ - //~^ ERROR: bare CR not allowed in block doc-comment - - // the following string literal has a bare CR in it - let _s = "foo bar"; //~ ERROR: bare CR not allowed in string - - // the following string literal has a bare CR in it - let _s = r"bar foo"; //~ ERROR: bare CR not allowed in raw string - - // the following string literal has a bare CR in it - let _s = "foo\ bar"; //~ ERROR: unknown character escape: `\r` -} diff --git a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr b/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr deleted file mode 100644 index 1a21fed63bd..00000000000 --- a/src/test/ui/parser/lex-bare-cr-string-literal-doc-comment.stderr +++ /dev/null @@ -1,46 +0,0 @@ -error: bare CR not allowed in doc-comment - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32 - | -LL | /// doc comment with bare CR: ' ' - | ^ - -error: bare CR not allowed in block doc-comment - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:7:38 - | -LL | /** block doc comment with bare CR: ' ' */ - | ^ - -error: bare CR not allowed in doc-comment - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:12:36 - | -LL | //! doc comment with bare CR: ' ' - | ^ - -error: bare CR not allowed in block doc-comment - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:15:42 - | -LL | /*! block doc comment with bare CR: ' ' */ - | ^ - -error: bare CR not allowed in string, use `\r` instead - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:19:18 - | -LL | let _s = "foo bar"; - | ^ help: escape the character: `\r` - -error: bare CR not allowed in raw string - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:22:19 - | -LL | let _s = r"bar foo"; - | ^ - -error: unknown character escape: `\r` - --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:25:19 - | -LL | let _s = "foo\ bar"; - | ^ unknown character escape - | - = help: this is an isolated carriage return; consider checking your editor and version control settings - -error: aborting due to 7 previous errors - diff --git a/src/test/ui/parser/lex-stray-backslash.rs b/src/test/ui/parser/lex-stray-backslash.rs deleted file mode 100644 index bb27f44c279..00000000000 --- a/src/test/ui/parser/lex-stray-backslash.rs +++ /dev/null @@ -1,3 +0,0 @@ -\ //~ ERROR: unknown start of token: \ - -fn main() {} diff --git a/src/test/ui/parser/lex-stray-backslash.stderr b/src/test/ui/parser/lex-stray-backslash.stderr deleted file mode 100644 index 06dc0f2b537..00000000000 --- a/src/test/ui/parser/lex-stray-backslash.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: unknown start of token: \ - --> $DIR/lex-stray-backslash.rs:1:1 - | -LL | \ - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/parser/lexer-crlf-line-endings-string-literal-doc-comment.rs b/src/test/ui/parser/lexer-crlf-line-endings-string-literal-doc-comment.rs deleted file mode 100644 index 802be7f5afb..00000000000 --- a/src/test/ui/parser/lexer-crlf-line-endings-string-literal-doc-comment.rs +++ /dev/null @@ -1,38 +0,0 @@ -// run-pass -// ignore-tidy-cr -// ignore-tidy-cr (repeated again because of tidy bug) -// license is ignored because tidy can't handle the CRLF here properly. - -// N.B., this file needs CRLF line endings. The .gitattributes file in -// this directory should enforce it. - -// ignore-pretty issue #37195 - -/// Doc comment that ends in CRLF -pub fn foo() {} - -/** Block doc comment that - * contains CRLF characters - */ -pub fn bar() {} - -fn main() { - let s = "string -literal"; - assert_eq!(s, "string\nliteral"); - - let s = "literal with \ - escaped newline"; - assert_eq!(s, "literal with escaped newline"); - - let s = r"string -literal"; - assert_eq!(s, "string\nliteral"); - let s = br"byte string -literal"; - assert_eq!(s, "byte string\nliteral".as_bytes()); - - // validate that our source file has CRLF endings - let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs"); - assert!(source.contains("string\r\nliteral")); -} |
