1
Fork 0

Elaborate supertrait span correctly to label the error better

This commit is contained in:
Michael Goulet 2024-09-14 15:55:16 -04:00
parent ae5f58d906
commit fd7ee484f9
5 changed files with 64 additions and 5 deletions

View file

@ -179,6 +179,10 @@ pub struct Clause<'tcx>(
);
impl<'tcx> rustc_type_ir::inherent::Clause<TyCtxt<'tcx>> for Clause<'tcx> {
fn as_predicate(self) -> Predicate<'tcx> {
self.as_predicate()
}
fn instantiate_supertrait(self, tcx: TyCtxt<'tcx>, trait_ref: ty::PolyTraitRef<'tcx>) -> Self {
self.instantiate_supertrait(tcx, trait_ref)
}