@@ -1068,7 +1068,7 @@ pub struct GlobalCtxt<'tcx> {
1068
1068
StableVec < TraitCandidate > > > ,
1069
1069
1070
1070
/// 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 > > > ,
1072
1072
1073
1073
hir_map : hir_map:: Map < ' tcx > ,
1074
1074
@@ -1081,7 +1081,7 @@ pub struct GlobalCtxt<'tcx> {
1081
1081
// Records the captured variables referenced by every closure
1082
1082
// expression. Do not track deps for this, just recompute it from
1083
1083
// scratch every time.
1084
- upvars : FxHashMap < DefId , Lrc < Vec < hir:: Upvar > > > ,
1084
+ upvars : FxHashMap < DefId , Vec < hir:: Upvar > > ,
1085
1085
1086
1086
maybe_unused_trait_imports : FxHashSet < DefId > ,
1087
1087
maybe_unused_extern_crates : Vec < ( DefId , Span ) > ,
@@ -1328,13 +1328,13 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
1328
1328
let exports: Vec < _ > = v. into_iter ( ) . map ( |e| {
1329
1329
e. map_id ( |id| hir. node_to_hir_id ( id) )
1330
1330
} ) . collect ( ) ;
1331
- ( k, Lrc :: new ( exports) )
1331
+ ( k, exports)
1332
1332
} ) . collect ( ) ,
1333
1333
upvars : resolutions. upvars . into_iter ( ) . map ( |( k, v) | {
1334
1334
let vars: Vec < _ > = v. into_iter ( ) . map ( |e| {
1335
1335
e. map_id ( |id| hir. node_to_hir_id ( id) )
1336
1336
} ) . collect ( ) ;
1337
- ( hir. local_def_id ( k) , Lrc :: new ( vars) )
1337
+ ( hir. local_def_id ( k) , vars)
1338
1338
} ) . collect ( ) ,
1339
1339
maybe_unused_trait_imports :
1340
1340
resolutions. maybe_unused_trait_imports
@@ -3053,7 +3053,7 @@ fn ptr_eq<T, U>(t: *const T, u: *const U) -> bool {
3053
3053
3054
3054
pub fn provide ( providers : & mut ty:: query:: Providers < ' _ > ) {
3055
3055
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 [ .. ] ) ;
3057
3057
providers. crate_name = |tcx, id| {
3058
3058
assert_eq ! ( id, LOCAL_CRATE ) ;
3059
3059
tcx. crate_name
@@ -3066,7 +3066,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
3066
3066
assert_eq ! ( id, LOCAL_CRATE ) ;
3067
3067
Lrc :: new ( middle:: lang_items:: collect ( tcx) )
3068
3068
} ;
3069
- providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . cloned ( ) ;
3069
+ providers. upvars = |tcx, id| tcx. gcx . upvars . get ( & id) . map ( |v| & v [ .. ] ) ;
3070
3070
providers. maybe_unused_trait_import = |tcx, id| {
3071
3071
tcx. maybe_unused_trait_imports . contains ( & id)
3072
3072
} ;
0 commit comments