Box PatKind::Range
.
Because it's the biggest variant. Also, make `PatRange` non-`Copy`, because it's 104 bytes, which is pretty big.
This commit is contained in:
parent
bd1e6836a0
commit
2c4c8eb1a3
7 changed files with 34 additions and 26 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue