From 28ef7c20d79803403be58eeffa18ab1fb21e261c Mon Sep 17 00:00:00 2001 From: cynecx Date: Mon, 12 Apr 2021 16:24:48 +0200 Subject: hir_ty: deal with TypeRef::Macro in HirFormatter --- crates/hir/src/semantics.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'crates/hir') diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 29c0821cf..62500602a 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs @@ -10,7 +10,7 @@ use hir_def::{ resolver::{self, HasResolver, Resolver, TypeNs}, AsMacroCall, FunctionId, TraitId, VariantId, }; -use hir_expand::{hygiene::Hygiene, name::AsName, ExpansionInfo}; +use hir_expand::{name::AsName, ExpansionInfo}; use hir_ty::associated_type_shorthand_candidates; use itertools::Itertools; use rustc_hash::{FxHashMap, FxHashSet}; @@ -854,8 +854,7 @@ impl<'a> SemanticsScope<'a> { /// Resolve a path as-if it was written at the given scope. This is /// necessary a heuristic, as it doesn't take hygiene into account. pub fn speculative_resolve(&self, path: &ast::Path) -> Option { - let hygiene = Hygiene::new(self.db.upcast(), self.file_id); - let ctx = body::LowerCtx::with_hygiene(&hygiene); + let ctx = body::LowerCtx::new(self.db.upcast(), self.file_id); let path = Path::from_src(path.clone(), &ctx)?; resolve_hir_path(self.db, &self.resolver, &path) } -- cgit v1.2.3