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

Fix false positive in empty_line_after_outer_attribute #2577

Conversation

phansch
Copy link
Member

@phansch phansch commented Mar 26, 2018

empty_line_after_outer_attribute produced a false positive warning when
deriving Copy and/or Clone for an item.

It looks like the second point in this comment is related,
as the attribute that causes the false positive has a path of
rustc_copy_clone_marker.

Checking for an empty TokenStream on the attribute gets around these attributes.

Fixes #2475, #2517

`empty_line_after_outer_attribute` produced a false positive warning when
deriving `Copy` and/or `Clone` for an item.

It looks like the second point in [this comment][that_comment] is related,
as the attribute that causes the false positive has a path of
`rustc_copy_clone_marker`.

Fixes rust-lang#2475

[that_comment]: rust-lang/rust#35900 (comment)
@oli-obk oli-obk merged commit f7c4bb6 into rust-lang:master Mar 26, 2018
@oli-obk
Copy link
Contributor

oli-obk commented Mar 26, 2018

Whee! I love tiny fixes that close multiple issues

@phansch
Copy link
Member Author

phansch commented Mar 26, 2018

I didn't expect this lint to cause so many false positives :D I plan to be at the rust learners meetup in Berlin tomorrow and want run the lint on some other, bigger repos.

@phansch phansch deleted the false_positive_empty_line_after_outer_attr_with_enum branch March 26, 2018 20:55
@oli-obk
Copy link
Contributor

oli-obk commented Mar 26, 2018

🎉 see you there

@phansch
Copy link
Member Author

phansch commented Mar 27, 2018

It was great being there! Looks like this also fixed #2453 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants