-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Extract into variables: overlapping ranges not permitted #16539
Comments
@DropDemBits I think this might be due to 1e1761e, if you have the time to look into that that at some point would be nice :) (anyone else is welcome to as well of course) |
It works fine with latest |
This seems to be location sensitive 😖 if you place that concrete snippet over https://github.com/rust-lang/rust-analyzer/blame/47b4dd72730e1b3d475cee8361faf47b79b0f583/crates/load-cargo/src/lib.rs#L349-L361 it triggers the error, if you put that function somewhere else it doesn't necessarily happen |
Hmm, that feels like it has like something to do with snippet rendering, so I should look into that. @rustbot claim |
I've managed to minimize it to this: fn expander_to_proc_macro() -> ProcMacro {
ProcMacro {
disabled: $0false$0,
}
}
struct ProcMacro {
disabled: bool,
} Which generates this
This is a problem for the current snippet rendering code since it doesn't account for differences between the final source range and the initial source range when determining the new range that an |
Invoking
Extract into variables
on that range here errors withoverlapping ranges not permitted
. I've been running into this quite frequently recently.The text was updated successfully, but these errors were encountered: