Update to nightly 2018-05-22

Fixes #2788
This commit is contained in:
Mateusz Mikuła
2018-05-22 15:45:14 +02:00
committed by Mateusz Mikuła
parent 3c6503eb4b
commit a1c44e966e
10 changed files with 41 additions and 37 deletions

View File

@@ -495,13 +495,13 @@ fn check_to_owned(cx: &LateContext, expr: &Expr, other: &Expr) {
// *arg impls PartialEq<other>
if !arg_ty
.builtin_deref(true)
.map_or(false, |tam| implements_trait(cx, tam.ty, partial_eq_trait_id, &[other_ty]))
.map_or(false, |tam| implements_trait(cx, tam.ty, partial_eq_trait_id, &[other_ty.into()]))
// arg impls PartialEq<*other>
&& !other_ty
.builtin_deref(true)
.map_or(false, |tam| implements_trait(cx, arg_ty, partial_eq_trait_id, &[tam.ty]))
.map_or(false, |tam| implements_trait(cx, arg_ty, partial_eq_trait_id, &[tam.ty.into()]))
// arg impls PartialEq<other>
&& !implements_trait(cx, arg_ty, partial_eq_trait_id, &[other_ty])
&& !implements_trait(cx, arg_ty, partial_eq_trait_id, &[other_ty.into()])
{
return;
}