forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#87671 - jesyspa:issue-87319-multiple-newlin…
…es, r=estebank Warn when an escaped newline skips multiple lines Resolves rust-lang#87319
- Loading branch information
Showing
7 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// check-pass | ||
fn main() { | ||
let s = "\ | ||
"; | ||
//~^^^ WARNING multiple lines skipped by escaped newline | ||
let s = "foo\ | ||
bar | ||
"; | ||
//~^^^ WARNING non-ASCII whitespace symbol '\u{a0}' is not skipped | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
warning: multiple lines skipped by escaped newline | ||
--> $DIR/str-escape.rs:3:14 | ||
| | ||
LL | let s = "\ | ||
| ______________^ | ||
LL | | | ||
LL | | "; | ||
| |_____________^ skipping everything up to and including this point | ||
|
||
warning: non-ASCII whitespace symbol '\u{a0}' is not skipped | ||
--> $DIR/str-escape.rs:7:17 | ||
| | ||
LL | let s = "foo\ | ||
| _________________^ | ||
LL | | bar | ||
| | ^ non-ASCII whitespace symbol '\u{a0}' is not skipped | ||
| |___| | ||
| | ||
|
||
warning: 2 warnings emitted | ||
|