|
5 | 5 | // makes all other generics or inline functions that it references
|
6 | 6 | // reachable as well.
|
7 | 7 |
|
8 |
| -use crate::hir::def::{DefKind, Res}; |
9 |
| -use crate::hir::def_id::{CrateNum, DefId}; |
10 |
| -use crate::hir::Node; |
11 |
| -use crate::hir::{CodegenFnAttrFlags, CodegenFnAttrs}; |
12 |
| -use crate::middle::privacy; |
13 |
| -use crate::session::config; |
14 |
| -use crate::ty::query::Providers; |
15 |
| -use crate::ty::{self, TyCtxt}; |
16 |
| -use crate::util::nodemap::{FxHashSet, HirIdSet}; |
| 8 | +use rustc::hir::def::{DefKind, Res}; |
| 9 | +use rustc::hir::def_id::{CrateNum, DefId}; |
| 10 | +use rustc::hir::Node; |
| 11 | +use rustc::hir::{CodegenFnAttrFlags, CodegenFnAttrs}; |
| 12 | +use rustc::middle::privacy; |
| 13 | +use rustc::session::config; |
| 14 | +use rustc::ty::query::Providers; |
| 15 | +use rustc::ty::{self, TyCtxt}; |
| 16 | +use rustc::util::nodemap::{FxHashSet, HirIdSet}; |
17 | 17 | use rustc_data_structures::sync::Lrc;
|
18 | 18 |
|
19 |
| -use crate::hir; |
20 |
| -use crate::hir::def_id::LOCAL_CRATE; |
21 |
| -use crate::hir::intravisit; |
22 |
| -use crate::hir::intravisit::{NestedVisitorMap, Visitor}; |
23 |
| -use crate::hir::itemlikevisit::ItemLikeVisitor; |
24 |
| -use rustc_macros::HashStable; |
| 19 | +use rustc::hir; |
| 20 | +use rustc::hir::def_id::LOCAL_CRATE; |
| 21 | +use rustc::hir::intravisit; |
| 22 | +use rustc::hir::intravisit::{NestedVisitorMap, Visitor}; |
| 23 | +use rustc::hir::itemlikevisit::ItemLikeVisitor; |
25 | 24 | use rustc_target::spec::abi::Abi;
|
26 | 25 |
|
27 | 26 | // Returns true if the given item must be inlined because it may be
|
@@ -378,12 +377,7 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a, 'tcx
|
378 | 377 | }
|
379 | 378 | }
|
380 | 379 |
|
381 |
| -// We introduce a new-type here, so we can have a specialized HashStable |
382 |
| -// implementation for it. |
383 |
| -#[derive(Clone, HashStable)] |
384 |
| -pub struct ReachableSet(pub Lrc<HirIdSet>); |
385 |
| - |
386 |
| -fn reachable_set(tcx: TyCtxt<'_>, crate_num: CrateNum) -> ReachableSet { |
| 380 | +fn reachable_set(tcx: TyCtxt<'_>, crate_num: CrateNum) -> Lrc<HirIdSet> { |
387 | 381 | debug_assert!(crate_num == LOCAL_CRATE);
|
388 | 382 |
|
389 | 383 | let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE);
|
@@ -429,7 +423,7 @@ fn reachable_set(tcx: TyCtxt<'_>, crate_num: CrateNum) -> ReachableSet {
|
429 | 423 | debug!("Inline reachability shows: {:?}", reachable_context.reachable_symbols);
|
430 | 424 |
|
431 | 425 | // Return the set of reachable symbols.
|
432 |
| - ReachableSet(Lrc::new(reachable_context.reachable_symbols)) |
| 426 | + Lrc::new(reachable_context.reachable_symbols) |
433 | 427 | }
|
434 | 428 |
|
435 | 429 | pub fn provide(providers: &mut Providers<'_>) {
|
|
0 commit comments