mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
fix: Don't duplicate sysroot crates in rustc workspace
This commit is contained in:
parent
3c862507b9
commit
ecb8616870
4 changed files with 30 additions and 12 deletions
|
@ -18,7 +18,8 @@ pub(crate) fn need_mut(ctx: &DiagnosticsContext<'_>, d: &hir::NeedMut) -> Diagno
|
|||
let use_range = d.span.value.text_range();
|
||||
for source in d.local.sources(ctx.sema.db) {
|
||||
let Some(ast) = source.name() else { continue };
|
||||
edit_builder.insert(ast.syntax().text_range().start(), "mut ".to_string());
|
||||
// FIXME: macros
|
||||
edit_builder.insert(ast.value.syntax().text_range().start(), "mut ".to_string());
|
||||
}
|
||||
let edit = edit_builder.finish();
|
||||
Some(vec![fix(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue