Query-ify global limit attribute handling
This commit is contained in:
parent
90442458ac
commit
ff15b5e2c7
30 changed files with 153 additions and 91 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue