From c77213d0cc4c536af70d2ca232ec481394fac808 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 24 Aug 2017 07:37:09 -0700 Subject: [PATCH] rustc: Skip cyclic checks in `item_path` This seems like it may be likely to cause bugs with `RUST_LOG` and other "interesting" scenarios, but it removes the usage of `try_get` for now! --- src/librustc/ty/item_path.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/librustc/ty/item_path.rs b/src/librustc/ty/item_path.rs index 76a20ed8f30..5caf5139812 100644 --- a/src/librustc/ty/item_path.rs +++ b/src/librustc/ty/item_path.rs @@ -13,7 +13,6 @@ use hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE}; use ty::{self, Ty, TyCtxt}; use syntax::ast; use syntax::symbol::Symbol; -use syntax_pos::DUMMY_SP; use std::cell::Cell; @@ -222,11 +221,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { let use_types = !self.is_default_impl(impl_def_id) && (!impl_def_id.is_local() || { // Otherwise, use filename/line-number if forced. let force_no_types = FORCE_IMPL_FILENAME_LINE.with(|f| f.get()); - !force_no_types && { - // Otherwise, use types if we can query them without inducing a cycle. - ty::queries::impl_trait_ref::try_get(self, DUMMY_SP, impl_def_id).is_ok() && - ty::queries::type_of::try_get(self, DUMMY_SP, impl_def_id).is_ok() - } + !force_no_types }); if !use_types {