Combine individual limit queries into single limits query

This commit is contained in:
Aaron Hill
2021-07-04 13:02:51 -05:00
parent ff15b5e2c7
commit 7e5a88a56c
20 changed files with 75 additions and 55 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.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));
}