check_trait
.map(|check_trait| {
self.infcx
- .type_implements_trait(
- check_trait,
- ty,
- self.tcx.mk_substs_trait(ty, &[]),
- self.param_env,
- )
+ .type_implements_trait(check_trait, [ty], self.param_env)
.must_apply_modulo_regions()
})
.unwrap_or(false),
check_trait
.map(|check_trait| {
self.infcx
- .type_implements_trait(
- check_trait,
- ty,
- self.tcx.mk_substs_trait(ty, &[]),
- self.param_env,
- )
+ .type_implements_trait(check_trait, [ty], self.param_env)
.must_apply_modulo_regions()
})
.unwrap_or(false),
let is_drop_defined_for_ty = |ty: Ty<'tcx>| {
let drop_trait = self.tcx.require_lang_item(hir::LangItem::Drop, Some(closure_span));
- let ty_params = self.tcx.mk_substs_trait(base_path_ty, &[]);
self.infcx
- .type_implements_trait(
- drop_trait,
- ty,
- ty_params,
- self.tcx.param_env(closure_def_id),
- )
+ .type_implements_trait(drop_trait, [ty], self.tcx.param_env(closure_def_id))
.must_apply_modulo_regions()
};
place_a: &Place<'tcx>,
place_b: &Place<'tcx>,
) -> PlaceAncestryRelation {
- // If Place A and Place B, don't start off from the same root variable, they are divergent.
+ // If Place A and Place B don't start off from the same root variable, they are divergent.
if place_a.base != place_b.base {
return PlaceAncestryRelation::Divergent;
}