Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/semantics.rs')
-rw-r--r--crates/hir/src/semantics.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs
index fdc604a006..f51fe80931 100644
--- a/crates/hir/src/semantics.rs
+++ b/crates/hir/src/semantics.rs
@@ -40,7 +40,7 @@ use crate::{
Access, Adjust, Adjustment, AutoBorrow, BindingMode, BuiltinAttr, Callable, ConstParam, Crate,
DeriveHelper, Field, Function, HasSource, HirFileId, Impl, InFile, Label, LifetimeParam, Local,
Macro, Module, ModuleDef, Name, OverloadedDeref, Path, ScopeDef, Struct, ToolModule, Trait,
- Type, TypeAlias, TypeParam, VariantDef,
+ TupleField, Type, TypeAlias, TypeParam, VariantDef,
};
pub enum DescendPreference {
@@ -428,7 +428,7 @@ impl<'db> SemanticsImpl<'db> {
if let Some(original_string) = ast::String::cast(original_token.clone()) {
if let Some(quote) = original_string.open_quote_text_range() {
return self
- .descend_into_macros(DescendPreference::SameText, original_token.clone())
+ .descend_into_macros(DescendPreference::SameText, original_token)
.into_iter()
.find_map(|token| {
self.resolve_offset_in_format_args(
@@ -1085,14 +1085,14 @@ impl<'db> SemanticsImpl<'db> {
self.analyze(call.syntax())?.resolve_method_call_as_callable(self.db, call)
}
- pub fn resolve_field(&self, field: &ast::FieldExpr) -> Option<Field> {
+ pub fn resolve_field(&self, field: &ast::FieldExpr) -> Option<Either<Field, TupleField>> {
self.analyze(field.syntax())?.resolve_field(self.db, field)
}
pub fn resolve_field_fallback(
&self,
field: &ast::FieldExpr,
- ) -> Option<Either<Field, Function>> {
+ ) -> Option<Either<Either<Field, TupleField>, Function>> {
self.analyze(field.syntax())?.resolve_field_fallback(self.db, field)
}