Skip to content

Commit c783d1e

Browse files
committed
InterpCx store TypingEnv instead of a ParamEnv
1 parent d8e5f7a commit c783d1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/non_copy_const.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ impl<'tcx> NonCopyConst<'tcx> {
270270
instance,
271271
promoted: None,
272272
};
273-
let param_env = cx.tcx.param_env(def_id).with_reveal_all_normalized(cx.tcx);
274-
let result = cx.tcx.const_eval_global_id_for_typeck(param_env, cid, DUMMY_SP);
273+
let typing_env = ty::TypingEnv::post_analysis(cx.tcx, def_id);
274+
let result = cx.tcx.const_eval_global_id_for_typeck(typing_env, cid, DUMMY_SP);
275275
Self::is_value_unfrozen_raw(cx, result, ty)
276276
}
277277

@@ -294,7 +294,7 @@ impl<'tcx> NonCopyConst<'tcx> {
294294
instance,
295295
promoted: None,
296296
};
297-
tcx.const_eval_global_id_for_typeck(typing_env.param_env, cid, span)
297+
tcx.const_eval_global_id_for_typeck(typing_env, cid, span)
298298
},
299299
Ok(None) => Err(ErrorHandled::TooGeneric(span)),
300300
Err(err) => Err(ErrorHandled::Reported(err.into(), span)),

0 commit comments

Comments
 (0)