diff options
| author | Michael Goulet <michael@errs.io> | 2022-08-17 16:20:22 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-08-21 02:35:11 +0000 |
| commit | 2a16a127a0ed1bf961ca7bce40499f6c407d53e2 (patch) | |
| tree | f0ab2f5c621ee44f1111ef584b8d59ba4d178000 /compiler/rustc_middle/src/traits | |
| parent | 8917894fda4c1c47369523448c75137c7b01fb6e (diff) | |
| download | rust-2a16a127a0ed1bf961ca7bce40499f6c407d53e2.tar.gz rust-2a16a127a0ed1bf961ca7bce40499f6c407d53e2.zip | |
More docs
Diffstat (limited to 'compiler/rustc_middle/src/traits')
| -rw-r--r-- | compiler/rustc_middle/src/traits/mod.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/traits/mod.rs b/compiler/rustc_middle/src/traits/mod.rs index e91878c62fd..9b82320e556 100644 --- a/compiler/rustc_middle/src/traits/mod.rs +++ b/compiler/rustc_middle/src/traits/mod.rs @@ -234,15 +234,21 @@ pub enum ObligationCauseCode<'tcx> { /// This is the trait reference from the given projection. ProjectionWf(ty::ProjectionTy<'tcx>), - /// In an impl of trait `X` for type `Y`, type `Y` must - /// also implement all supertraits of `X`. + /// Must satisfy all of the where-clause predicates of the + /// given item. ItemObligation(DefId), - ExprItemObligation(DefId, rustc_hir::HirId, usize), - - /// Like `ItemObligation`, but with extra detail on the source of the obligation. + /// Like `ItemObligation`, but carries the span of the + /// predicate when it can be identified. BindingObligation(DefId, Span), + /// Like `ItemObligation`, but carries the `HirId` of the + /// expression that caused the obligation, and the `usize` + /// indicates exactly which predicate it is in the list of + /// instantiated predicates. + ExprItemObligation(DefId, rustc_hir::HirId, usize), + + /// Combines `ExprItemObligation` and `BindingObligation`. ExprBindingObligation(DefId, Span, rustc_hir::HirId, usize), /// A type like `&'a T` is WF only if `T: 'a`. |
