From 311c8e29b1686ca40c25826f798c31edaecd366e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 23 Nov 2018 10:05:51 +0100 Subject: [PATCH] rustup https://github.com/rust-lang/rust/pull/54071/ --- clippy_lints/src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index e5e3138acf686..d7adcd179816b 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1064,8 +1064,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CastPass { if_chain!{ if let ty::RawPtr(from_ptr_ty) = &cast_from.sty; if let ty::RawPtr(to_ptr_ty) = &cast_to.sty; - if let Some(from_align) = cx.layout_of(from_ptr_ty.ty).ok().map(|a| a.align.abi()); - if let Some(to_align) = cx.layout_of(to_ptr_ty.ty).ok().map(|a| a.align.abi()); + if let Some(from_align) = cx.layout_of(from_ptr_ty.ty).ok().map(|a| a.align.abi); + if let Some(to_align) = cx.layout_of(to_ptr_ty.ty).ok().map(|a| a.align.abi); if from_align < to_align; // with c_void, we inherently need to trust the user if ! (