Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/handlers/remove_unused_imports.rs')
| -rw-r--r-- | crates/ide-assists/src/handlers/remove_unused_imports.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide-assists/src/handlers/remove_unused_imports.rs b/crates/ide-assists/src/handlers/remove_unused_imports.rs index fb96882ed4..dff9a660cf 100644 --- a/crates/ide-assists/src/handlers/remove_unused_imports.rs +++ b/crates/ide-assists/src/handlers/remove_unused_imports.rs @@ -81,7 +81,7 @@ pub(crate) fn remove_unused_imports(acc: &mut Assists, ctx: &AssistContext<'_>) // Get the actual definition associated with this use item. let res = match ctx.sema.resolve_path_per_ns(&path) { - Some(x) if x.take_path().is_some() => x, + Some(x) if x.any().is_some() => x, Some(_) | None => { return None; } |