diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-14 15:55:16 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-10-04 17:15:28 -0400 |
| commit | fd7ee484f9da99120116dc560452dd551d4c6496 (patch) | |
| tree | 8f9ebb4abb182cff48f1a4d93325db01ae891939 /compiler/rustc_middle/src | |
| parent | ae5f58d906e755bff56dd9667c1d8b13ca236286 (diff) | |
| download | rust-fd7ee484f9da99120116dc560452dd551d4c6496.tar.gz rust-fd7ee484f9da99120116dc560452dd551d4c6496.zip | |
Elaborate supertrait span correctly to label the error better
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/predicate.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/predicate.rs b/compiler/rustc_middle/src/ty/predicate.rs index fd4e8f1cd4e..d20cb368278 100644 --- a/compiler/rustc_middle/src/ty/predicate.rs +++ b/compiler/rustc_middle/src/ty/predicate.rs @@ -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) } |
