mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Use Symbol in Name
This commit is contained in:
parent
843806b79f
commit
3fe815b0f3
75 changed files with 750 additions and 755 deletions
|
@ -823,13 +823,13 @@ fn classify_name_ref(
|
|||
for item in trait_.items_with_supertraits(sema.db) {
|
||||
match item {
|
||||
hir::AssocItem::TypeAlias(assoc_ty) => {
|
||||
if assoc_ty.name(sema.db).as_str()? == arg_name {
|
||||
if assoc_ty.name(sema.db).as_str() == arg_name {
|
||||
override_location = Some(TypeLocation::AssocTypeEq);
|
||||
return None;
|
||||
}
|
||||
},
|
||||
hir::AssocItem::Const(const_) => {
|
||||
if const_.name(sema.db)?.as_str()? == arg_name {
|
||||
if const_.name(sema.db)?.as_str() == arg_name {
|
||||
override_location = Some(TypeLocation::AssocConstEq);
|
||||
return None;
|
||||
}
|
||||
|
@ -867,7 +867,7 @@ fn classify_name_ref(
|
|||
let trait_items = trait_.items_with_supertraits(sema.db);
|
||||
let assoc_ty = trait_items.iter().find_map(|item| match item {
|
||||
hir::AssocItem::TypeAlias(assoc_ty) => {
|
||||
(assoc_ty.name(sema.db).as_str()? == arg_name)
|
||||
(assoc_ty.name(sema.db).as_str() == arg_name)
|
||||
.then_some(assoc_ty)
|
||||
},
|
||||
_ => None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue