-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.F-rust_2018_preview`#![feature(rust_2018_preview)]``#![feature(rust_2018_preview)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-epochWorking group: Epoch (2018) managementWorking group: Epoch (2018) management
Milestone
Description
Thanks to @AdamNiederer opening rust-lang/rustfix#114, we found that it's not possible to fully upgrade faster to the 2018 edition with rustfix.
It fails with "Cannot replace slice of data that was already replaced", because we get the exact same suggestion twice -- because it's part of an expanded macro.
It looks to me like in addition to the changes @alexcrichton introduced in #50665, we'll also need to add a macro check here and here.
There are three solutions. The easy one is to not mark the suggestions as MachineApplicable when the span they come from is in macro. The hard ones are to only trigger this once (or just once as MachineApplicable), or to omit exact duplicates in rustfix (and hope for the best).
Metadata
Metadata
Assignees
Labels
A-edition-2018Area: The 2018 editionArea: The 2018 editionA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.F-rust_2018_preview`#![feature(rust_2018_preview)]``#![feature(rust_2018_preview)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.WG-epochWorking group: Epoch (2018) managementWorking group: Epoch (2018) management