From 7ed42a3a527b2c39826cfeb3626521c11abb25f0 Mon Sep 17 00:00:00 2001 From: cynecx Date: Sat, 17 Apr 2021 17:38:38 +0200 Subject: hir_def: refactor expand_macro_type and cleanups --- crates/hir_ty/src/lower.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/lower.rs') diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index 95ca5bdb0..e01b7aa91 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -15,7 +15,7 @@ use hir_def::{ generics::{TypeParamProvenance, WherePredicate, WherePredicateTypeTarget}, path::{GenericArg, Path, PathSegment, PathSegments}, resolver::{HasResolver, Resolver, TypeNs}, - type_ref::{expand_type_ref, TraitRef as HirTraitRef, TypeBound, TypeRef}, + type_ref::{expand_macro_type, TraitRef as HirTraitRef, TypeBound, TypeRef}, AdtId, AssocContainerId, AssocItemId, ConstId, ConstParamId, EnumId, EnumVariantId, FunctionId, GenericDefId, HasModule, ImplId, LocalFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, VariantId, @@ -289,8 +289,8 @@ impl<'a> TyLoweringContext<'a> { } mt @ TypeRef::Macro(_) => { if let Some(module_id) = self.resolver.module() { - match expand_type_ref(self.db.upcast(), module_id, mt) { - Some(type_ref) => self.lower_ty(type_ref.as_ref()), + match expand_macro_type(self.db.upcast(), module_id, mt) { + Some(type_ref) => self.lower_ty(&type_ref), None => TyKind::Error.intern(&Interner), } } else { -- cgit v1.2.3