Closed
Description
Original rustfix issue: rust-lang/rustfix#147
When rustc outputs warnings like "you don't need this extern crate line anymore, delete it," it doesn't include accompanying attributes. This leads rustfix to apply its suggestion to delete the extern crate line, but leave the attribute, which then gets applied to the next item.
For example:
#[cfg(unix)]
extern crate nix;
mod foo;
becomes
#[cfg(unix)]
mod foo;
which applies the #[cfg(unix)]
attribute to mod foo;
which is definitely not what was desired.