mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
collapsible_match
This commit is contained in:
parent
657376858f
commit
4184c6af0d
6 changed files with 50 additions and 65 deletions
|
@ -796,8 +796,7 @@ fn classify_name_ref(
|
|||
ast::AssocTypeArg(arg) => {
|
||||
let trait_ = ast::PathSegment::cast(arg.syntax().parent()?.parent()?)?;
|
||||
match sema.resolve_path(&trait_.parent_path().top_path())? {
|
||||
hir::PathResolution::Def(def) => match def {
|
||||
hir::ModuleDef::Trait(trait_) => {
|
||||
hir::PathResolution::Def(hir::ModuleDef::Trait(trait_)) => {
|
||||
let arg_name = arg.name_ref()?;
|
||||
let arg_name = arg_name.text();
|
||||
let trait_items = trait_.items_with_supertraits(sema.db);
|
||||
|
@ -810,8 +809,6 @@ fn classify_name_ref(
|
|||
})?;
|
||||
sema.source(*assoc_ty)?.value.generic_param_list()
|
||||
}
|
||||
_ => None,
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue