Clarify DerivedObligationCause may hold alias id
This commit is contained in:
@@ -474,7 +474,11 @@ pub enum WellFormedLoc {
|
||||
#[derive(TypeVisitable, TypeFoldable)]
|
||||
pub struct ImplDerivedObligationCause<'tcx> {
|
||||
pub derived: DerivedObligationCause<'tcx>,
|
||||
pub impl_def_id: DefId,
|
||||
/// The `DefId` of the `impl` that gave rise to the `derived` obligation.
|
||||
/// If the `derived` obligation arose from a trait alias, which conceptually has a synthetic impl,
|
||||
/// then this will be the `DefId` of that trait alias. Care should therefore be taken to handle
|
||||
/// that exceptional case where appropriate.
|
||||
pub impl_or_alias_def_id: DefId,
|
||||
/// The index of the derived predicate in the parent impl's predicates.
|
||||
pub impl_def_predicate_index: Option<usize>,
|
||||
pub span: Span,
|
||||
|
||||
Reference in New Issue
Block a user