Skip to content
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

Stop flagging unexpected inner attributes as outer ones in certain diagnostics #95189

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

fmease
Copy link
Member

@fmease fmease commented Mar 22, 2022

Fixes #94340.

In the issue to-be-fixed I write that the general message an inner attribute is not permitted in this context should be more specific noting that the “context” is the include macro. This, however, cannot be achieved without touching a lot of things and passing a flag to the parse_expr and parse_item calls in expand_include. This seems rather hacky to me. That's why I left it as it. Span::from_expansion does not apply either AFAIK.

@rustbot label A-diagnostics T-compiler

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 22, 2022
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @matthewjasper (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the A-diagnostics Area: Messages for errors, warnings, and lints label Mar 22, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 22, 2022
@fmease
Copy link
Member Author

fmease commented Apr 4, 2022

matthewjasper seems to be busy. Let me re-assign. Apologies if that's too brash.
r? @estebank
(You worked in this file in #88257)
Thank you in advance! :)

@fmease fmease force-pushed the fix-issue-94340 branch from 8c6aa05 to 5ab0548 Compare April 6, 2022 17:54
@estebank
Copy link
Contributor

estebank commented Apr 7, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Apr 7, 2022

📌 Commit 5ab0548 has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 7, 2022
Rollup of 4 pull requests

Successful merges:

 - rust-lang#95189 (Stop flagging unexpected inner attributes as outer ones in certain diagnostics)
 - rust-lang#95752 (Regression test for rust-lang#82866)
 - rust-lang#95753 (Correct safety reasoning in `str::make_ascii_{lower,upper}case()`)
 - rust-lang#95757 (Use gender neutral terms)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 648d644 into rust-lang:master Apr 7, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 7, 2022
@fmease fmease deleted the fix-issue-94340 branch April 12, 2022 01:47
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 S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempting to include! inner attributes leads to incorrect and confusing diagnostics
6 participants