Skip to content

Commit 4513651

Browse files
committed
Auto merge of #15921 - Young-Flash:tmp, r=Veykril
chore: add use case for `PathSegment::qualifying_trait` add use case for `PathSegment::qualifying_trait`, which introduced in #15875
2 parents 91b3148 + 1cbda61 commit 4513651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/unqualify_method_call.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fn add_import(
9191
) {
9292
if let Some(path_segment) = qualifier.segment() {
9393
// for `<i32 as std::ops::Add>`
94-
let path_type = path_segment.syntax().children().filter_map(ast::PathType::cast).last();
94+
let path_type = path_segment.qualifying_trait();
9595
let import = match path_type {
9696
Some(it) => {
9797
if let Some(path) = it.path() {

0 commit comments

Comments
 (0)