@@ -680,32 +680,33 @@ impl DebruijnIndex {
680
680
}
681
681
}
682
682
683
- /// A "DynTy" could be either a `dyn Trait` or an (opaque) `impl
684
- /// Trait`. Both of them are conceptually very related to a
685
- /// "existential type" of the form `exists<T> { T: Trait }`. The
686
- /// `DynTy` type represents those bounds.
683
+ /// A "DynTy" represents a trait object ( `dyn Trait`). Trait objects
684
+ /// are conceptually very related to an "existential type" of the form
685
+ /// `exists<T> { T: Trait }` (another exaple of such type is `impl Trait`).
686
+ /// `DynTy` represents the bounds on that type .
687
687
///
688
688
/// The "binder" here represents the unknown self type. So, a type like
689
- /// `impl for<'a> Fn(&'a u32)` would be represented with two-levels of
689
+ /// `dyn for<'a> Fn(&'a u32)` would be represented with two-levels of
690
690
/// binder, as "depicted" here:
691
691
///
692
692
/// ```notrust
693
693
/// exists<type> {
694
694
/// vec![
695
695
/// // A QuantifiedWhereClause:
696
- /// forall<region> { ^1: Fn(&^0 u32) }
696
+ /// forall<region> { ^1.0 : Fn(&^0. 0 u32) }
697
697
/// ]
698
698
/// }
699
699
/// ```
700
700
///
701
701
/// The outer `exists<type>` binder indicates that there exists
702
702
/// some type that meets the criteria within, but that type is not
703
- /// known. It is referenced within the type using `^1`, indicating
703
+ /// known. It is referenced within the type using `^1.0 `, indicating
704
704
/// a bound type with debruijn index 1 (i.e., skipping through one
705
705
/// level of binder).
706
706
#[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
707
707
pub struct DynTy < I : Interner > {
708
708
pub bounds : Binders < QuantifiedWhereClauses < I > > ,
709
+ pub lifetime : Lifetime < I > ,
709
710
}
710
711
711
712
#[ derive( Copy , Clone , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
0 commit comments