Rm ValuePairs::Ty/Const
Remove old value pairs which is a strict subset of Terms.
This commit is contained in:
parent
fdd6f4e56c
commit
be236d7fc2
8 changed files with 67 additions and 74 deletions
|
@ -1378,26 +1378,11 @@ impl<'a, 'tcx> InferCtxtPrivExt<'a, 'tcx> for InferCtxt<'a, 'tcx> {
|
|||
normalized_ty,
|
||||
data.term,
|
||||
) {
|
||||
values = Some(match (normalized_ty, data.term) {
|
||||
(ty::Term::Ty(normalized_ty), ty::Term::Ty(ty)) => {
|
||||
infer::ValuePairs::Types(ExpectedFound::new(
|
||||
is_normalized_ty_expected,
|
||||
normalized_ty,
|
||||
ty,
|
||||
))
|
||||
}
|
||||
(ty::Term::Const(normalized_ct), ty::Term::Const(ct)) => {
|
||||
infer::ValuePairs::Consts(ExpectedFound::new(
|
||||
is_normalized_ty_expected,
|
||||
normalized_ct,
|
||||
ct,
|
||||
))
|
||||
}
|
||||
(_, _) => span_bug!(
|
||||
obligation.cause.span,
|
||||
"found const or type where other expected"
|
||||
),
|
||||
});
|
||||
values = Some(infer::ValuePairs::Terms(ExpectedFound::new(
|
||||
is_normalized_ty_expected,
|
||||
normalized_ty,
|
||||
data.term,
|
||||
)));
|
||||
err_buf = error;
|
||||
err = &err_buf;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue