Stop using PolyTraitRef for closure/coroutine predicates already instantiated w placeholders

This commit is contained in:
Michael Goulet
2024-04-13 12:34:35 -04:00
parent 3a0db6c152
commit d2ec957680
5 changed files with 29 additions and 28 deletions

View File

@@ -620,11 +620,10 @@ pub enum SelectionError<'tcx> {
OpaqueTypeAutoTraitLeakageUnknown(DefId),
}
// FIXME(@lcnr): The `Binder` here should be unnecessary. Just use `TraitRef` instead.
#[derive(Clone, Debug, TypeVisitable)]
pub struct SignatureMismatchData<'tcx> {
pub found_trait_ref: ty::PolyTraitRef<'tcx>,
pub expected_trait_ref: ty::PolyTraitRef<'tcx>,
pub found_trait_ref: ty::TraitRef<'tcx>,
pub expected_trait_ref: ty::TraitRef<'tcx>,
pub terr: ty::error::TypeError<'tcx>,
}