//! this is not implemented however: a mono item will be produced
//! regardless of whether it is actually needed or not.
-use rustc::hir;
+use rustc::hir::{self, TransFnAttrFlags};
use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::hir::map as hir_map;
use rustc_data_structures::bitvec::BitVector;
-use syntax::attr;
-
use std::iter;
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
MonoItemCollectionMode::Lazy => {
self.entry_fn == Some(def_id) ||
self.tcx.is_reachable_non_generic(def_id) ||
- attr::contains_name(&self.tcx.get_attrs(def_id),
- "rustc_std_internal_symbol")
+ self.tcx.trans_fn_attrs(def_id).flags.contains(
+ TransFnAttrFlags::RUSTC_STD_INTERNAL_SYMBOL)
}
}
}