diff options
author | Benjamin Coenen <[email protected]> | 2020-05-02 11:25:04 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-02 11:25:04 +0100 |
commit | 0b40876b993ab30421624b831cb03b4042eb0142 (patch) | |
tree | 85abb233dd8645480d61ab857a2b46c1209b142a /crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | |
parent | eea21738ab9e0b7438d03f7b2efc18c15cc30cf2 (diff) | |
parent | 75bc0249463b72971200e482d69dad88d4e76ae3 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs index 2f02df303..918e8dd8d 100644 --- a/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs +++ b/crates/ra_assists/src/handlers/replace_qualified_name_with_use.rs | |||
@@ -27,7 +27,7 @@ pub(crate) fn replace_qualified_name_with_use(ctx: AssistCtx) -> Option<Assist> | |||
27 | return None; | 27 | return None; |
28 | } | 28 | } |
29 | 29 | ||
30 | let hir_path = hir::Path::from_ast(path.clone())?; | 30 | let hir_path = ctx.sema.lower_path(&path)?; |
31 | let segments = collect_hir_path_segments(&hir_path)?; | 31 | let segments = collect_hir_path_segments(&hir_path)?; |
32 | if segments.len() < 2 { | 32 | if segments.len() < 2 { |
33 | return None; | 33 | return None; |