More docs

This commit is contained in:
Michael Goulet
2022-08-17 16:20:22 +00:00
parent 8917894fda
commit 2a16a127a0
3 changed files with 18 additions and 5 deletions

View File

@@ -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`.