diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-08-24 07:37:09 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-08-25 16:08:35 -0700 |
| commit | c77213d0cc4c536af70d2ca232ec481394fac808 (patch) | |
| tree | f380b1c389c12c44484faf80aa09e0b59662500e | |
| parent | 82bad957c0314bb841757d8260f0f7f8f5050c57 (diff) | |
| download | rust-c77213d0cc4c536af70d2ca232ec481394fac808.tar.gz rust-c77213d0cc4c536af70d2ca232ec481394fac808.zip | |
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!
| -rw-r--r-- | src/librustc/ty/item_path.rs | 7 |
1 files changed, 1 insertions, 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 { |
