Fold PatKind::NamedConstant
into PatKind::Constant
This commit is contained in:
parent
ff2f7a7a83
commit
c25b44bee9
12 changed files with 21 additions and 33 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue