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#95859 - rainy-me:unterminated-nested-block-…
…comment, r=petrochenkov Improve diagnostics for unterminated nested block comment close rust-lang#95283 (This is my first time try to messing around with rust compiler and might get a lot of things wrong... 🙇 )
- Loading branch information
Showing
3 changed files
with
75 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* //~ ERROR E0758 | ||
/* */ | ||
/* | ||
*/ |
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 @@ | ||
error[E0758]: unterminated block comment | ||
--> $DIR/unterminated-nested-comment.rs:1:1 | ||
| | ||
LL | /* | ||
| ^- | ||
| | | ||
| _unterminated block comment | ||
| | | ||
LL | | /* */ | ||
LL | | /* | ||
| | -- | ||
| | | | ||
| | ...as last nested comment starts here, maybe you want to close this instead? | ||
LL | | */ | ||
| |_--^ | ||
| | | ||
| ...and last nested comment terminates here. | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0758`. |