Matthias Krüger 2019-09-28 10:42:41 +02:00
parent edd90473ec
commit 5f6e3f35b5
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
if let Some(anon_const) = &var.disr_expr {
let param_env = ty::ParamEnv::empty();
let def_id = cx.tcx.hir().body_owner_def_id(anon_const.body);
let substs = InternalSubsts::identity_for_item(cx.tcx.global_tcx(), def_id);
let substs = InternalSubsts::identity_for_item(cx.tcx, def_id);
let instance = ty::Instance::new(def_id, substs);
let c_id = GlobalId {
instance,

View file

@ -799,7 +799,7 @@ pub fn type_is_unsafe_function<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx
}
pub fn is_copy<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool {
ty.is_copy_modulo_regions(cx.tcx.global_tcx(), cx.param_env, DUMMY_SP)
ty.is_copy_modulo_regions(cx.tcx, cx.param_env, DUMMY_SP)
}
/// Checks if an expression is constructing a tuple-like enum variant or struct