Skip to content

Commit c77213d

Browse files
committed
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!
1 parent 82bad95 commit c77213d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/librustc/ty/item_path.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
1313
use ty::{self, Ty, TyCtxt};
1414
use syntax::ast;
1515
use syntax::symbol::Symbol;
16-
use syntax_pos::DUMMY_SP;
1716

1817
use std::cell::Cell;
1918

@@ -222,11 +221,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
222221
let use_types = !self.is_default_impl(impl_def_id) && (!impl_def_id.is_local() || {
223222
// Otherwise, use filename/line-number if forced.
224223
let force_no_types = FORCE_IMPL_FILENAME_LINE.with(|f| f.get());
225-
!force_no_types && {
226-
// Otherwise, use types if we can query them without inducing a cycle.
227-
ty::queries::impl_trait_ref::try_get(self, DUMMY_SP, impl_def_id).is_ok() &&
228-
ty::queries::type_of::try_get(self, DUMMY_SP, impl_def_id).is_ok()
229-
}
224+
!force_no_types
230225
});
231226

232227
if !use_types {

0 commit comments

Comments
 (0)