We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 91b3148 + 1cbda61 commit 4513651Copy full SHA for 4513651
crates/ide-assists/src/handlers/unqualify_method_call.rs
@@ -91,7 +91,7 @@ fn add_import(
91
) {
92
if let Some(path_segment) = qualifier.segment() {
93
// for `<i32 as std::ops::Add>`
94
- let path_type = path_segment.syntax().children().filter_map(ast::PathType::cast).last();
+ let path_type = path_segment.qualifying_trait();
95
let import = match path_type {
96
Some(it) => {
97
if let Some(path) = it.path() {
0 commit comments