@@ -680,32 +680,33 @@ impl DebruijnIndex {
680680 }
681681}
682682
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 .
687687///
688688/// 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
690690/// binder, as "depicted" here:
691691///
692692/// ```notrust
693693/// exists<type> {
694694/// vec![
695695/// // A QuantifiedWhereClause:
696- /// forall<region> { ^1: Fn(&^0 u32) }
696+ /// forall<region> { ^1.0 : Fn(&^0. 0 u32) }
697697/// ]
698698/// }
699699/// ```
700700///
701701/// The outer `exists<type>` binder indicates that there exists
702702/// 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
704704/// a bound type with debruijn index 1 (i.e., skipping through one
705705/// level of binder).
706706#[ derive( Clone , PartialEq , Eq , Hash , Fold , Visit , HasInterner , Zip ) ]
707707pub struct DynTy < I : Interner > {
708708 pub bounds : Binders < QuantifiedWhereClauses < I > > ,
709+ pub lifetime : Lifetime < I > ,
709710}
710711
711712#[ derive( Copy , Clone , PartialEq , Eq , Hash , PartialOrd , Ord ) ]
0 commit comments