Use field-less variant for AliasBound.
This commit is contained in:
parent
d4a816c813
commit
d3cf813b8d
@ -76,7 +76,7 @@ pub(super) enum CandidateSource {
|
||||
/// let _y = x.clone();
|
||||
/// }
|
||||
/// ```
|
||||
AliasBound(),
|
||||
AliasBound,
|
||||
}
|
||||
|
||||
pub(super) trait GoalKind<'tcx>: TypeFoldable<'tcx> + Copy + Eq {
|
||||
@ -340,15 +340,14 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
||||
ty::Alias(_, alias_ty) => alias_ty,
|
||||
};
|
||||
|
||||
for (_, (assumption, _)) in self
|
||||
for (assumption, _) in self
|
||||
.tcx()
|
||||
.bound_explicit_item_bounds(alias_ty.def_id)
|
||||
.subst_iter_copied(self.tcx(), alias_ty.substs)
|
||||
.enumerate()
|
||||
{
|
||||
match G::consider_assumption(self, goal, assumption) {
|
||||
Ok(result) => {
|
||||
candidates.push(Candidate { source: CandidateSource::AliasBound(), result })
|
||||
candidates.push(Candidate { source: CandidateSource::AliasBound, result })
|
||||
}
|
||||
Err(NoSolution) => (),
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
||||
(CandidateSource::Impl(_), _)
|
||||
| (CandidateSource::ParamEnv(_), _)
|
||||
| (CandidateSource::BuiltinImpl, _)
|
||||
| (CandidateSource::AliasBound(), _) => unimplemented!(),
|
||||
| (CandidateSource::AliasBound, _) => unimplemented!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
||||
match (candidate.source, other.source) {
|
||||
(CandidateSource::Impl(_), _)
|
||||
| (CandidateSource::ParamEnv(_), _)
|
||||
| (CandidateSource::AliasBound(), _)
|
||||
| (CandidateSource::AliasBound, _)
|
||||
| (CandidateSource::BuiltinImpl, _) => unimplemented!(),
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user