@@ -1591,13 +1591,16 @@ rustc_queries! {
1591
1591
/// for each parameter if a trait object were to be passed for that parameter.
1592
1592
/// For example, for `struct Foo<'a, T, U>`, this would be `['static, 'static]`.
1593
1593
/// For `struct Foo<'a, T: 'a, U>`, this would instead be `['a, 'static]`.
1594
- query object_lifetime_defaults( _: LocalDefId ) -> Option <& ' tcx [ ObjectLifetimeDefault ] > {
1595
- desc { "looking up lifetime defaults for a region on an item" }
1596
- }
1597
- /// Fetch the lifetimes for all the trait objects in an item-like.
1598
- query object_lifetime_map( _: LocalDefId ) -> FxHashMap <ItemLocalId , Region > {
1594
+ query object_lifetime_defaults( def_id: LocalDefId ) -> Option <& ' tcx [ ObjectLifetimeDefault ] > {
1595
+ desc { "computing object lifetime defaults for `{:?}`'s generic parameters" , def_id }
1596
+ }
1597
+ /// Fetch the lifetimes for all the trait objects in an item-like. This query uses
1598
+ /// `object_lifetime_defaults` which returns a map `GenericParam -> ObjectLifetimeDefault`,
1599
+ /// and build a map from each `dyn Trait` type to the implicit lifetime `'a`, so that
1600
+ /// `dyn Trait` should be understood as `dyn Trait + 'a`
1601
+ query object_lifetime_map( def_id: LocalDefId ) -> FxHashMap <ItemLocalId , Region > {
1599
1602
storage( ArenaCacheSelector <' tcx>)
1600
- desc { "looking up lifetime defaults for a region on an item" }
1603
+ desc { "looking up lifetime for trait-object types inside `{:?}`" , def_id }
1601
1604
}
1602
1605
query late_bound_vars_map( _: LocalDefId )
1603
1606
-> Option <& ' tcx FxHashMap <ItemLocalId , Vec <ty:: BoundVariableKind >>> {
0 commit comments