about summary refs log tree commit diff
path: root/compiler/rustc_middle
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-08 04:27:20 +0000
committerMichael Goulet <michael@errs.io>2024-11-08 04:56:08 +0000
commit97dfe8b87115c44d480b6282aae7754e7c4ab4fe (patch)
treece666ae95451e00c8b95d4223e6d362e22832801 /compiler/rustc_middle
parente4c1a0016c0bd1b6579123c785e38e63b4ccf143 (diff)
downloadrust-97dfe8b87115c44d480b6282aae7754e7c4ab4fe.tar.gz
rust-97dfe8b87115c44d480b6282aae7754e7c4ab4fe.zip
Manually register some bounds for a better span
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 40e5ec45959..09731d565b6 100644
--- a/compiler/rustc_middle/src/traits/mod.rs
+++ b/compiler/rustc_middle/src/traits/mod.rs
@@ -193,6 +193,11 @@ pub enum ObligationCauseCode<'tcx> {
     /// The span corresponds to the clause.
     WhereClause(DefId, Span),
 
+    /// Represents a bound for an opaque we are checking the well-formedness of.
+    /// The def-id corresponds to a specific definition site that we found the
+    /// hidden type from, if any.
+    OpaqueTypeBound(Span, Option<LocalDefId>),
+
     /// Like `WhereClause`, but also identifies the expression
     /// which requires the `where` clause to be proven, and also
     /// identifies the index of the predicate in the `predicates_of`