From 2c4c8eb1a3add142c2380aecdd46ec32e42a9900 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 26 Aug 2022 11:36:24 +1000 Subject: Box `PatKind::Range`. Because it's the biggest variant. Also, make `PatRange` non-`Copy`, because it's 104 bytes, which is pretty big. --- compiler/rustc_ty_utils/src/consts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_ty_utils') diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index 6cbccb4bf29..bb6b3e1ff5d 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -157,7 +157,7 @@ impl<'a, 'tcx> AbstractConstBuilder<'a, 'tcx> { match pat.kind { thir::PatKind::Constant { value } => value.has_param_types_or_consts(), - thir::PatKind::Range(thir::PatRange { lo, hi, .. }) => { + thir::PatKind::Range(box thir::PatRange { lo, hi, .. }) => { lo.has_param_types_or_consts() || hi.has_param_types_or_consts() } _ => false, -- cgit 1.4.1-3-g733a5