about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorJack Huey <31162821+jackh726@users.noreply.github.com>2022-09-16 17:20:11 -0400
committerJack Huey <31162821+jackh726@users.noreply.github.com>2022-09-16 17:20:11 -0400
commit9929c0ac76bbbe2b3b8a0c28df91310067ae57fa (patch)
tree696ecea54a52961e5257e4137714ba37acb8bf3e /compiler/rustc_middle
parentec17be2656fc69e212d9079f79322a68a3cfbc19 (diff)
downloadrust-9929c0ac76bbbe2b3b8a0c28df91310067ae57fa.tar.gz
rust-9929c0ac76bbbe2b3b8a0c28df91310067ae57fa.zip
Add AscribeUserTypeProvePredicate
Diffstat (limited to 'compiler/rustc_middle')
-rw-r--r--compiler/rustc_middle/src/traits/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs
index 4cdcb40ba11..68a7af0b8c8 100644
--- a/compiler/rustc_middle/src/traits/mod.rs
+++ b/compiler/rustc_middle/src/traits/mod.rs
@@ -188,6 +188,9 @@ impl<'tcx> ObligationCause<'tcx> {
     pub fn to_constraint_category(&self) -> ConstraintCategory<'tcx> {
         match self.code() {
             MatchImpl(cause, _) => cause.to_constraint_category(),
+            AscribeUserTypeProvePredicate(predicate_span) => {
+                ConstraintCategory::Predicate(*predicate_span)
+            }
             _ => ConstraintCategory::BoringNoLocation,
         }
     }
@@ -426,6 +429,8 @@ pub enum ObligationCauseCode<'tcx> {
         is_lit: bool,
         output_ty: Option<Ty<'tcx>>,
     },
+
+    AscribeUserTypeProvePredicate(Span),
 }
 
 /// The 'location' at which we try to perform HIR-based wf checking.