use rustc_data_structures::fx::FxHashSet;
use rustc_hir::def_id::DefId;
+use rustc_middle::query::Providers;
use rustc_middle::ty::subst::SubstsRef;
use rustc_middle::ty::util::{needs_drop_components, AlwaysRequiresDrop};
use rustc_middle::ty::{self, EarlyBinder, Ty, TyCtxt};
_ => {
tcx.sess.delay_span_bug(
tcx.hir().span_if_local(def_id).unwrap_or(DUMMY_SP),
- &format!("unexpected generator witness type {:?}", witness),
+ format!("unexpected generator witness type {:?}", witness),
);
return Some(Err(AlwaysRequiresDrop));
}
} else {
let field_tys = adt_def.all_fields().map(|field| {
let r = tcx.type_of(field.did).subst(tcx, substs);
- debug!("drop_tys_helper: Subst into {:?} with {:?} gettng {:?}", field, substs, r);
+ debug!("drop_tys_helper: Subst into {:?} with {:?} getting {:?}", field, substs, r);
r
});
if only_significant {
.map(|components| tcx.mk_type_list(&components))
}
-pub(crate) fn provide(providers: &mut ty::query::Providers) {
- *providers = ty::query::Providers {
+pub(crate) fn provide(providers: &mut Providers) {
+ *providers = Providers {
needs_drop_raw,
has_significant_drop_raw,
adt_drop_tys,