about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-14 15:55:16 -0400
committerMichael Goulet <michael@errs.io>2024-10-04 17:15:28 -0400
commitfd7ee484f9da99120116dc560452dd551d4c6496 (patch)
tree8f9ebb4abb182cff48f1a4d93325db01ae891939 /compiler/rustc_middle/src
parentae5f58d906e755bff56dd9667c1d8b13ca236286 (diff)
downloadrust-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.rs4
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)
     }