Fold PatKind::NamedConstant into PatKind::Constant

This commit is contained in:
Esteban Küber 2024-11-06 21:10:31 +00:00
parent ff2f7a7a83
commit c25b44bee9
12 changed files with 21 additions and 33 deletions

View file

@ -536,7 +536,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
),
}
}
PatKind::Constant { value } | PatKind::NamedConstant { value, span: _ } => {
PatKind::Constant { value, opt_def: _ } => {
match ty.kind() {
ty::Bool => {
ctor = match value.try_eval_bool(cx.tcx, cx.param_env) {