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

Make empty_line_after_outer_attr an early lint #5609

Merged
merged 4 commits into from
May 26, 2020

Conversation

phansch
Copy link
Member

@phansch phansch commented May 17, 2020

Fixes #5567

Unfortunately I couldn't find a way to reproduce the issue without syn/quote. Considering that most real-world macros use syn and/or quote, I think it's okay to pull them in anyway.

changelog: Fix false positive in [empty_line_after_outer_attr]

@phansch phansch added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label May 17, 2020
@phansch phansch force-pushed the empty-line-after-outer-attr-fix branch from 2b651cb to f3af7d5 Compare May 17, 2020 16:39
@flip1995
Copy link
Member

We may have to be careful with the versions we use in syn and quote, so it is compatible with other tools of the rust-lang/rust repo?

@phansch phansch force-pushed the empty-line-after-outer-attr-fix branch from f3af7d5 to 681fc24 Compare May 17, 2020 17:15
@phansch
Copy link
Member Author

phansch commented May 17, 2020

We may have to be careful with the versions we use in syn and quote, so it is compatible with other tools of the rust-lang/rust repo?

For now I've specified the same versions as in rustc's Cargo.lock. I'm not sure how it will behave with the full feature though - it's required for the TraitItem and ItemTrait types.

@mati865
Copy link
Contributor

mati865 commented May 17, 2020

Rust will override features with https://github.com/rust-lang/rust/blob/master/src/tools/rustc-workspace-hack/Cargo.toml
That means:

quote = { version = "1", features = ["default"] }
...
syn-1 = { package = "syn", version = "1", features = ['fold', 'full', 'extra-traits', 'visit'] }

@flip1995
Copy link
Member

@phansch I think using just version = "1" would be better here, since the same is used in rustc-workspace-hack. After that r=me

@flip1995 flip1995 self-assigned this May 25, 2020
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 25, 2020
@phansch phansch force-pushed the empty-line-after-outer-attr-fix branch from 681fc24 to fd86b31 Compare May 26, 2020 14:52
@phansch
Copy link
Member Author

phansch commented May 26, 2020

@bors r=flip1995

@bors
Copy link
Contributor

bors commented May 26, 2020

📌 Commit fd86b31 has been approved by flip1995

@bors
Copy link
Contributor

bors commented May 26, 2020

⌛ Testing commit fd86b31 with merge 291385b...

@bors
Copy link
Contributor

bors commented May 26, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 291385b to master...

@bors bors merged commit 291385b into rust-lang:master May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

false positive on empty_line_after_outer_attr with async-trait
4 participants