use rustc::session::config::EntryFnType;
use rustc::ty::adjustment::{CustomCoerceUnsized, PointerCast};
use rustc::ty::print::obsolete::DefPathBasedNames;
-use rustc::ty::subst::{InternalSubsts, Subst, SubstsRef};
+use rustc::ty::subst::{InternalSubsts, SubstsRef};
use rustc::ty::{self, GenericParamDefKind, Instance, Ty, TyCtxt, TypeFoldable};
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::sync::{par_iter, MTLock, MTRef, ParallelIterator};
self.output.push(MonoItem::Static(*def_id));
}
}
- PlaceBase::Static(box Static {
- kind: StaticKind::Promoted(promoted, substs),
- def_id,
- ..
- }) => {
- let instance = Instance::new(*def_id, substs.subst(self.tcx, self.param_substs));
- match self.tcx.const_eval_promoted(instance, *promoted) {
- Ok(val) => collect_const(self.tcx, val, substs, self.output),
- Err(ErrorHandled::Reported) => {}
- Err(ErrorHandled::TooGeneric) => {
- let span = self.tcx.promoted_mir(*def_id)[*promoted].span;
- span_bug!(span, "collection encountered polymorphic constant")
- }
- }
- }
PlaceBase::Local(_) => {
// Locals have no relevance for collector.
}