-
Notifications
You must be signed in to change notification settings - Fork 13k
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
faster
fails to migrate
#51211
Comments
Possibly a case of #48704. |
I've minimized this to the following: #![feature(rust_2018_preview)]
#![warn(rust_2018_compatibility)]
macro_rules! foo {
() => {
{
use myself::f;
f();
}
}
}
mod myself {
pub fn f() {}
}
fn main() {
foo!();
foo!();
} which yields:
It's unclear to me whether this falls under the purview of #48704 or rustfix. The problem is that two duplicate suggestions are made and rustfix yields an error on this because it looks suspicious. I'm gonna send a fix to rustfix in the meantime as I've tested locally that it works and should at least help improve the situation. |
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I've attempted a fix for this in rustfix with rust-lang/rustfix#131 which fixes this exact issue, and at least successfully got the |
Actually, closing this in favor of #51205 as testing has shown that issue is the only thing that blocks |
Currently the compiler suffers from bugs like rust-lang/rust#51211 where it will emit duplicate suggestions for code that originates in a macro. This commit allows rustfix to accept and process these suggestions by ignoring exact duplicates of replacements. While not a great solution long term it should hopefully be a non-harmful band-aid until rustc is fixed!
@AdamNiederer helpfully reported that
faster
fails to migrate successfully:Failing: /~https://github.com/AdamNiederer/faster/commits/rust-2018-migration
They write:
The text was updated successfully, but these errors were encountered: