rebase and use ty::Const in patterns again

This commit is contained in:
b-naber 2022-03-25 10:06:10 +01:00
parent ac60db231c
commit 0078e54185
13 changed files with 73 additions and 144 deletions

View file

@ -2711,7 +2711,7 @@ impl<'tcx> ConstantKind<'tcx> {
if let Some(val) = c.val().try_eval(tcx, param_env) {
match val {
Ok(val) => Self::Val(val, c.ty()),
Err(ErrorReported) => Self::Ty(tcx.const_error(self.ty())),
Err(_) => Self::Ty(tcx.const_error(self.ty())),
}
} else {
self