Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/resolver.rs')
-rw-r--r--crates/hir-def/src/resolver.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/hir-def/src/resolver.rs b/crates/hir-def/src/resolver.rs
index 4931418546..c196f00281 100644
--- a/crates/hir-def/src/resolver.rs
+++ b/crates/hir-def/src/resolver.rs
@@ -194,12 +194,12 @@ impl Resolver {
}
}
&Scope::ImplDefScope(impl_) => {
- if *first_name == sym::Self_ {
+ if *first_name == sym::Self_.clone() {
return Some((TypeNs::SelfType(impl_), remaining_idx(), None));
}
}
&Scope::AdtScope(adt) => {
- if *first_name == sym::Self_ {
+ if *first_name == sym::Self_.clone() {
return Some((TypeNs::AdtSelfType(adt), remaining_idx(), None));
}
}
@@ -291,7 +291,7 @@ impl Resolver {
}
};
let n_segments = path.segments().len();
- let tmp = Name::new_symbol_root(sym::Self_);
+ let tmp = Name::new_symbol_root(sym::self_.clone());
let first_name = if path.is_self() { &tmp } else { path.segments().first()? };
let skip_to_mod = path.kind != PathKind::Plain && !path.is_self();
if skip_to_mod {
@@ -322,7 +322,7 @@ impl Resolver {
}
}
&Scope::ImplDefScope(impl_) => {
- if *first_name == sym::Self_ {
+ if *first_name == sym::Self_.clone() {
return Some(ResolveValueResult::ValueNs(
ValueNs::ImplSelf(impl_),
None,
@@ -349,7 +349,7 @@ impl Resolver {
}
}
&Scope::ImplDefScope(impl_) => {
- if *first_name == sym::Self_ {
+ if *first_name == sym::Self_.clone() {
return Some(ResolveValueResult::Partial(
TypeNs::SelfType(impl_),
1,
@@ -358,7 +358,7 @@ impl Resolver {
}
}
Scope::AdtScope(adt) => {
- if *first_name == sym::Self_ {
+ if *first_name == sym::Self_.clone() {
let ty = TypeNs::AdtSelfType(*adt);
return Some(ResolveValueResult::Partial(ty, 1, None));
}
@@ -422,7 +422,7 @@ impl Resolver {
}
pub fn resolve_lifetime(&self, lifetime: &LifetimeRef) -> Option<LifetimeNs> {
- if lifetime.name == sym::tick_static {
+ if lifetime.name == sym::tick_static.clone() {
return Some(LifetimeNs::Static);
}
@@ -778,10 +778,10 @@ impl Scope {
}
}
Scope::ImplDefScope(i) => {
- acc.add(&Name::new_symbol_root(sym::Self_), ScopeDef::ImplSelfType(*i));
+ acc.add(&Name::new_symbol_root(sym::Self_.clone()), ScopeDef::ImplSelfType(*i));
}
Scope::AdtScope(i) => {
- acc.add(&Name::new_symbol_root(sym::Self_), ScopeDef::AdtSelfType(*i));
+ acc.add(&Name::new_symbol_root(sym::Self_.clone()), ScopeDef::AdtSelfType(*i));
}
Scope::ExprScope(scope) => {
if let Some((label, name)) = scope.expr_scopes.label(scope.scope_id) {