Use correct ParamEnv in Instance::resolve

This commit is contained in:
Matthew Jasper 2020-02-01 11:41:58 +00:00
parent d20646b2d8
commit 465b86253c

View file

@ -285,7 +285,7 @@ impl<'tcx> Instance<'tcx> {
_ => {
if Some(def_id) == tcx.lang_items().drop_in_place_fn() {
let ty = substs.type_at(0);
if ty.needs_drop(tcx, ty::ParamEnv::reveal_all()) {
if ty.needs_drop(tcx, param_env.with_reveal_all()) {
debug!(" => nontrivial drop glue");
ty::InstanceDef::DropGlue(def_id, Some(ty))
} else {