@@ -61,7 +61,7 @@ rustc_queries! {
61
61
/// predicate gets in the way of some checks, which are intended
62
62
/// to operate over only the actual where-clauses written by the
63
63
/// user.)
64
- query predicates_of( _: DefId ) -> Lrc < ty:: GenericPredicates <' tcx> > { }
64
+ query predicates_of( _: DefId ) -> & ' tcx ty:: GenericPredicates <' tcx> { }
65
65
66
66
query native_libraries( _: CrateNum ) -> Lrc <Vec <NativeLibrary >> {
67
67
desc { "looking up the native libraries of a linked crate" }
@@ -166,11 +166,11 @@ rustc_queries! {
166
166
/// equal to the `explicit_predicates_of` predicates plus the
167
167
/// `inferred_outlives_of` predicates.
168
168
query predicates_defined_on( _: DefId )
169
- -> Lrc < ty:: GenericPredicates <' tcx> > { }
169
+ -> & ' tcx ty:: GenericPredicates <' tcx> { }
170
170
171
171
/// Returns the predicates written explicit by the user.
172
172
query explicit_predicates_of( _: DefId )
173
- -> Lrc < ty:: GenericPredicates <' tcx> > { }
173
+ -> & ' tcx ty:: GenericPredicates <' tcx> { }
174
174
175
175
/// Returns the inferred outlives predicates (e.g., for `struct
176
176
/// Foo<'a, T> { x: &'a T }`, this would return `T: 'a`).
@@ -182,14 +182,14 @@ rustc_queries! {
182
182
/// evaluate them even during type conversion, often before the
183
183
/// full predicates are available (note that supertraits have
184
184
/// additional acyclicity requirements).
185
- query super_predicates_of( key: DefId ) -> Lrc < ty:: GenericPredicates <' tcx> > {
185
+ query super_predicates_of( key: DefId ) -> & ' tcx ty:: GenericPredicates <' tcx> {
186
186
desc { |tcx| "computing the supertraits of `{}`" , tcx. def_path_str( key) }
187
187
}
188
188
189
189
/// To avoid cycles within the predicates of a single item we compute
190
190
/// per-type-parameter predicates for resolving `T::AssocTy`.
191
191
query type_param_predicates( key: ( DefId , DefId ) )
192
- -> Lrc < ty:: GenericPredicates <' tcx> > {
192
+ -> & ' tcx ty:: GenericPredicates <' tcx> {
193
193
no_force
194
194
desc { |tcx| "computing the bounds for type parameter `{}`" , {
195
195
let id = tcx. hir( ) . as_local_hir_id( key. 1 ) . unwrap( ) ;
@@ -264,7 +264,7 @@ rustc_queries! {
264
264
265
265
Other {
266
266
/// Maps from an impl/trait def-id to a list of the def-ids of its items
267
- query associated_item_def_ids( _: DefId ) -> Lrc < Vec < DefId >> { }
267
+ query associated_item_def_ids( _: DefId ) -> & ' tcx [ DefId ] { }
268
268
269
269
/// Maps from a trait item to the trait item "descriptor"
270
270
query associated_item( _: DefId ) -> ty:: AssociatedItem { }
@@ -279,7 +279,7 @@ rustc_queries! {
279
279
/// Maps a DefId of a type to a list of its inherent impls.
280
280
/// Contains implementations of methods that are inherent to a type.
281
281
/// Methods in these implementations don't need to be exported.
282
- query inherent_impls( _: DefId ) -> Lrc < Vec < DefId >> {
282
+ query inherent_impls( _: DefId ) -> & ' tcx [ DefId ] {
283
283
eval_always
284
284
}
285
285
}
@@ -361,7 +361,7 @@ rustc_queries! {
361
361
}
362
362
363
363
Other {
364
- query used_trait_imports( _: DefId ) -> Lrc < DefIdSet > { }
364
+ query used_trait_imports( _: DefId ) -> & ' tcx DefIdSet { }
365
365
}
366
366
367
367
TypeChecking {
@@ -373,7 +373,7 @@ rustc_queries! {
373
373
}
374
374
375
375
BorrowChecking {
376
- query borrowck( _: DefId ) -> Lrc < BorrowCheckResult > { }
376
+ query borrowck( _: DefId ) -> & ' tcx BorrowCheckResult { }
377
377
378
378
/// Borrow checks the function body. If this is a closure, returns
379
379
/// additional requirements that the closure's creator must verify.
@@ -385,7 +385,7 @@ rustc_queries! {
385
385
/// Not meant to be used directly outside of coherence.
386
386
/// (Defined only for `LOCAL_CRATE`.)
387
387
query crate_inherent_impls( k: CrateNum )
388
- -> Lrc < CrateInherentImpls > {
388
+ -> & ' tcx CrateInherentImpls {
389
389
eval_always
390
390
desc { "all inherent impls defined in crate `{:?}`" , k }
391
391
}
@@ -683,11 +683,11 @@ rustc_queries! {
683
683
Codegen {
684
684
query upstream_monomorphizations(
685
685
k: CrateNum
686
- ) -> Lrc < DefIdMap <Lrc < FxHashMap <SubstsRef <' tcx>, CrateNum >> >> {
686
+ ) -> & ' tcx DefIdMap <FxHashMap <SubstsRef <' tcx>, CrateNum >> {
687
687
desc { "collecting available upstream monomorphizations `{:?}`" , k }
688
688
}
689
689
query upstream_monomorphizations_for( _: DefId )
690
- -> Option <Lrc < FxHashMap <SubstsRef <' tcx>, CrateNum > >> { }
690
+ -> Option <& ' tcx FxHashMap <SubstsRef <' tcx>, CrateNum >> { }
691
691
}
692
692
693
693
Other {
@@ -726,12 +726,12 @@ rustc_queries! {
726
726
727
727
TypeChecking {
728
728
query implementations_of_trait( _: ( CrateNum , DefId ) )
729
- -> Lrc < Vec < DefId >> {
729
+ -> & ' tcx [ DefId ] {
730
730
no_force
731
731
desc { "looking up implementations of a trait in a crate" }
732
732
}
733
733
query all_trait_implementations( _: CrateNum )
734
- -> Lrc < Vec < DefId >> {
734
+ -> & ' tcx [ DefId ] {
735
735
desc { "looking up all (?) trait implementations" }
736
736
}
737
737
}
@@ -756,19 +756,19 @@ rustc_queries! {
756
756
757
757
BorrowChecking {
758
758
// Lifetime resolution. See `middle::resolve_lifetimes`.
759
- query resolve_lifetimes( _: CrateNum ) -> Lrc < ResolveLifetimes > {
759
+ query resolve_lifetimes( _: CrateNum ) -> & ' tcx ResolveLifetimes {
760
760
desc { "resolving lifetimes" }
761
761
}
762
762
query named_region_map( _: DefIndex ) ->
763
- Option <Lrc < FxHashMap <ItemLocalId , Region > >> {
763
+ Option <& ' tcx FxHashMap <ItemLocalId , Region >> {
764
764
desc { "looking up a named region" }
765
765
}
766
766
query is_late_bound_map( _: DefIndex ) ->
767
- Option <Lrc < FxHashSet <ItemLocalId > >> {
767
+ Option <& ' tcx FxHashSet <ItemLocalId >> {
768
768
desc { "testing if a region is late bound" }
769
769
}
770
770
query object_lifetime_defaults_map( _: DefIndex )
771
- -> Option <Lrc < FxHashMap <ItemLocalId , Lrc < Vec <ObjectLifetimeDefault >> >>> {
771
+ -> Option <& ' tcx FxHashMap <ItemLocalId , Vec <ObjectLifetimeDefault >>> {
772
772
desc { "looking up lifetime defaults for a region" }
773
773
}
774
774
}
@@ -786,7 +786,7 @@ rustc_queries! {
786
786
eval_always
787
787
desc { "fetching what a crate is named" }
788
788
}
789
- query item_children( _: DefId ) -> Lrc < Vec < Export <hir:: HirId >>> { }
789
+ query item_children( _: DefId ) -> & ' tcx [ Export <hir:: HirId >] { }
790
790
query extern_mod_stmt_cnum( _: DefId ) -> Option <CrateNum > { }
791
791
792
792
query get_lib_features( _: CrateNum ) -> Lrc <LibFeatures > {
0 commit comments