Skip to content

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

Merged
bors merged 1 commit into
rust-lang:masterfrom
fmease:fix-issue-94340
Apr 7, 2022
Merged

Stop flagging unexpected inner attributes as outer ones in certain diagnostics#95189
bors merged 1 commit into
rust-lang:masterfrom
fmease:fix-issue-94340

Conversation

@fmease

@fmeasefmease commented Mar 22, 2022

Copy link
Copy Markdown
Member

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

@rustbotrustbot 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
Copy Markdown
Contributor

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.

@rustbotrustbot added the A-diagnostics Area: Messages for errors, warnings, and lints label Mar 22, 2022
@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 22, 2022
Comment threadsrc/test/ui/parser/issues/issue-94340.stderr Outdated
@fmease

fmease commented Apr 4, 2022

Copy link
Copy Markdown
MemberAuthor

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! :)

Comment threadsrc/test/ui/parser/issues/issue-94340.stderr Outdated
Comment threadsrc/test/ui/parser/attr.stderr
@estebank

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Apr 7, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 5ab0548 has been approved by estebank

@borsbors 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
@Dylan-DPCDylan-DPC mentioned this pull request 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:masterApr 7, 2022
@rustbotrustbot 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant 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

@fmease@rust-highfive@estebank@bors@matthewjasper@rustbot