Query-ify global limit attribute handling
This commit is contained in:
@@ -344,7 +344,7 @@ impl<'a, 'b, 'tcx> TypeFolder<'tcx> for AssocTypeNormalizer<'a, 'b, 'tcx> {
|
||||
Reveal::UserFacing => ty,
|
||||
|
||||
Reveal::All => {
|
||||
let recursion_limit = self.tcx().sess.recursion_limit();
|
||||
let recursion_limit = self.tcx().recursion_limit(());
|
||||
if !recursion_limit.value_within_limit(self.depth) {
|
||||
let obligation = Obligation::with_depth(
|
||||
self.cause.clone(),
|
||||
@@ -726,7 +726,7 @@ fn project_type<'cx, 'tcx>(
|
||||
) -> Result<ProjectedTy<'tcx>, ProjectionTyError<'tcx>> {
|
||||
debug!(?obligation, "project_type");
|
||||
|
||||
if !selcx.tcx().sess.recursion_limit().value_within_limit(obligation.recursion_depth) {
|
||||
if !selcx.tcx().recursion_limit(()).value_within_limit(obligation.recursion_depth) {
|
||||
debug!("project: overflow!");
|
||||
// This should really be an immediate error, but some existing code
|
||||
// relies on being able to recover from this.
|
||||
|
||||
Reference in New Issue
Block a user