@@ -1068,7 +1068,7 @@ pub struct GlobalCtxt<'tcx> {
10681068 StableVec < TraitCandidate > > > ,
10691069
10701070 /// Export map produced by name resolution.
1071- export_map : FxHashMap < DefId , Lrc < Vec < Export < hir:: HirId > > > > ,
1071+ export_map : FxHashMap < DefId , Vec < Export < hir:: HirId > > > ,
10721072
10731073 hir_map : hir_map:: Map < ' tcx > ,
10741074
@@ -1081,7 +1081,7 @@ pub struct GlobalCtxt<'tcx> {
10811081 // Records the captured variables referenced by every closure
10821082 // expression. Do not track deps for this, just recompute it from
10831083 // scratch every time.
1084- upvars : FxHashMap < DefId , Lrc < Vec < hir:: Upvar > > > ,
1084+ upvars : FxHashMap < DefId , Vec < hir:: Upvar > > ,
10851085
10861086 maybe_unused_trait_imports : FxHashSet < DefId > ,
10871087 maybe_unused_extern_crates : Vec < ( DefId , Span ) > ,
@@ -1328,13 +1328,13 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
13281328 let exports: Vec < _ > = v. into_iter ( ) . map ( |e| {
13291329 e. map_id ( |id| hir. node_to_hir_id ( id) )
13301330 } ) . collect ( ) ;
1331- ( k, Lrc :: new ( exports) )
1331+ ( k, exports)
13321332 } ) . collect ( ) ,
13331333 upvars : resolutions. upvars . into_iter ( ) . map ( |( k, v) | {
13341334 let vars: Vec < _ > = v. into_iter ( ) . map ( |e| {
13351335 e. map_id ( |id| hir. node_to_hir_id ( id) )
13361336 } ) . collect ( ) ;
1337- ( hir. local_def_id ( k) , Lrc :: new ( vars) )
1337+ ( hir. local_def_id ( k) , vars)
13381338 } ) . collect ( ) ,
13391339 maybe_unused_trait_imports :
13401340 resolutions. maybe_unused_trait_imports
@@ -3053,7 +3053,7 @@ fn ptr_eq<T, U>(t: *const T, u: *const U) -> bool {
30533053
30543054pub fn provide ( providers : & mut ty:: query:: Providers < ' _ > ) {
30553055 providers. in_scope_traits_map = |tcx, id| tcx. gcx . trait_map . get ( & id) ;
3056- providers. module_exports = |tcx, id| tcx. gcx . export_map . get ( & id) . cloned ( ) ;
3056+ providers. module_exports = |tcx, id| tcx. gcx . export_map . get ( & id) . map ( |v| & v [ .. ] ) ;
30573057 providers. crate_name = |tcx, id| {
30583058 assert_eq ! ( id, LOCAL_CRATE ) ;
30593059 tcx. crate_name
@@ -3066,7 +3066,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
30663066 assert_eq ! ( id, LOCAL_CRATE ) ;
30673067 Lrc :: new ( middle:: lang_items:: collect ( tcx) )
30683068 } ;
3069- providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . cloned ( ) ;
3069+ providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . map ( |v| & v [ .. ] ) ;
30703070 providers. maybe_unused_trait_import = |tcx, id| {
30713071 tcx. maybe_unused_trait_imports . contains ( & id)
30723072 } ;
0 commit comments