-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better diagnostics for accidentally nested block comments #95283
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
jrmuizel
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Mar 24, 2022
estebank
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
labels
Mar 24, 2022
@rustbot claim |
@rustbot claim |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 14, 2022
…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... 🙇 )
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 14, 2022
…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... 🙇 )
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 14, 2022
…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... 🙇 )
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 15, 2022
…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... 🙇 )
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 15, 2022
…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... 🙇 )
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 16, 2022
…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... 🙇 )
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given:
The compiler says:
This initially confused me quite a bit because I couldn't figure out why Rust wasn't seeing block comment terminator. Eventually, I realized that the line
//*foo = 12
changed from being a commented out line, to starting a nested block comment. Since block comments nest in Rust, I'm used to commenting out blocks without worrying about what's inside of them which made this behaviour surprising.I'm not sure how practical it is, but it would be cool if we could check for comments like
//*foo = 12
in block comments to suggest them as the source of the problem.The text was updated successfully, but these errors were encountered: