rebase and use ty::Const in patterns again
This commit is contained in:
parent
ac60db231c
commit
0078e54185
13 changed files with 73 additions and 144 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue