Skip to content
/ rust Public
forked from rust-lang/rust

Commit 944f237

Browse files
committed
always emit consider AutoImplCandidates for them if they don't also have a ProjectionCandidate
1 parent b5b3f33 commit 944f237

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
552552
// Note that this is only sound as projection candidates of opaque types
553553
// are always applicable for auto traits.
554554
}
555+
ty::Alias(_, _) => candidates.vec.push(AutoImplCandidate),
555556

556557
ty::Bool
557558
| ty::Char
@@ -570,7 +571,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
570571
| ty::Generator(..)
571572
| ty::Never
572573
| ty::Tuple(_)
573-
| ty::Alias(_, _)
574574
| ty::GeneratorWitness(_)
575575
| ty::GeneratorWitnessMIR(..) => {
576576
// Only consider auto impls if there are no manual impls for the root of `self_ty`.

0 commit comments

Comments
 (0)