Don't try and handle unfed type_of on anon consts
This commit is contained in:
@@ -309,10 +309,10 @@ impl<'tcx> Visitor<'tcx> for CollectItemTypesVisitor<'tcx> {
|
||||
self.tcx.ensure().type_of(param.def_id);
|
||||
if let Some(default) = default {
|
||||
// need to store default and type of default
|
||||
self.tcx.ensure().const_param_default(param.def_id);
|
||||
if let hir::ConstArgKind::Anon(ac) = default.kind {
|
||||
self.tcx.ensure().type_of(ac.def_id);
|
||||
}
|
||||
self.tcx.ensure().const_param_default(param.def_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1817,7 +1817,6 @@ fn const_param_default<'tcx>(
|
||||
),
|
||||
};
|
||||
let icx = ItemCtxt::new(tcx, def_id);
|
||||
// FIXME(const_generics): investigate which places do and don't need const ty feeding
|
||||
let ct = icx.lowerer().lower_const_arg(default_ct, FeedConstTy::No);
|
||||
let ct = icx.lowerer().lower_const_arg(default_ct, FeedConstTy::Param(def_id.to_def_id()));
|
||||
ty::EarlyBinder::bind(ct)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user