about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-26 11:36:24 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-02 07:26:22 +1000
commit2c4c8eb1a3add142c2380aecdd46ec32e42a9900 (patch)
tree96b8d5fc3c85e97a83ff5beef2fc33c2b2f47f85 /compiler/rustc_ty_utils
parentbd1e6836a07fa7b96b41effc3ec90e60aaa494df (diff)
downloadrust-2c4c8eb1a3add142c2380aecdd46ec32e42a9900.tar.gz
rust-2c4c8eb1a3add142c2380aecdd46ec32e42a9900.zip
Box `PatKind::Range`.
Because it's the biggest variant. Also, make `PatRange` non-`Copy`,
because it's 104 bytes, which is pretty big.
Diffstat (limited to 'compiler/rustc_ty_utils')
-rw-r--r--compiler/rustc_ty_utils/src/consts.rs2
1 files changed, 1 insertions, 1 deletions
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,