From 9929c0ac76bbbe2b3b8a0c28df91310067ae57fa Mon Sep 17 00:00:00 2001 From: Jack Huey <31162821+jackh726@users.noreply.github.com> Date: Fri, 16 Sep 2022 17:20:11 -0400 Subject: Add AscribeUserTypeProvePredicate --- compiler/rustc_middle/src/traits/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'compiler/rustc_middle/src') 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>, }, + + AscribeUserTypeProvePredicate(Span), } /// The 'location' at which we try to perform HIR-based wf checking. -- cgit 1.4.1-3-g733a5