mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
chore: add use case for PathSegment::qualifying_trait
This commit is contained in:
parent
bc978217b3
commit
1cbda612bc
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ fn add_import(
|
|||
) {
|
||||
if let Some(path_segment) = qualifier.segment() {
|
||||
// for `<i32 as std::ops::Add>`
|
||||
let path_type = path_segment.syntax().children().filter_map(ast::PathType::cast).last();
|
||||
let path_type = path_segment.qualifying_trait();
|
||||
let import = match path_type {
|
||||
Some(it) => {
|
||||
if let Some(path) = it.path() {
|
||||
|
|
Loading…
Reference in a new issue