nits
This commit is contained in:
parent
c24844048f
commit
f7fc0b7121
4 changed files with 16 additions and 20 deletions
|
@ -184,7 +184,7 @@ pub(super) trait GoalKind<'tcx>: TypeFoldable<'tcx> + Copy + Eq {
|
|||
|
||||
// `dyn Trait1` can be unsized to `dyn Trait2` if they are the same trait, or
|
||||
// if `Trait2` is a (transitive) supertrait of `Trait2`.
|
||||
fn consider_builtin_dyn_unsize_candidates(
|
||||
fn consider_builtin_dyn_upcast_candidates(
|
||||
ecx: &mut EvalCtxt<'_, 'tcx>,
|
||||
goal: Goal<'tcx, Self>,
|
||||
) -> Vec<CanonicalResponse<'tcx>>;
|
||||
|
@ -334,7 +334,7 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
|
|||
// There may be multiple unsize candidates for a trait with several supertraits:
|
||||
// `trait Foo: Bar<A> + Bar<B>` and `dyn Foo: Unsize<dyn Bar<_>>`
|
||||
if lang_items.unsize_trait() == Some(trait_def_id) {
|
||||
for result in G::consider_builtin_dyn_unsize_candidates(self, goal) {
|
||||
for result in G::consider_builtin_dyn_upcast_candidates(self, goal) {
|
||||
candidates.push(Candidate { source: CandidateSource::BuiltinImpl, result });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue