Query-ify global limit attribute handling

This commit is contained in:
Aaron Hill
2021-06-25 18:48:26 -05:00
parent 90442458ac
commit ff15b5e2c7
30 changed files with 153 additions and 91 deletions

View File

@@ -221,7 +221,7 @@ fn layout_raw<'tcx>(
ty::tls::with_related_context(tcx, move |icx| {
let (param_env, ty) = query.into_parts();
if !tcx.sess.recursion_limit().value_within_limit(icx.layout_depth) {
if !tcx.recursion_limit(()).value_within_limit(icx.layout_depth) {
tcx.sess.fatal(&format!("overflow representing the type `{}`", ty));
}