Merge pull request #3452 from matthiaskrgr/rustup

rustup https://github.com/rust-lang/rust/pull/54071/
This commit is contained in:
Philipp Hansch 2018-11-23 10:38:20 +01:00 committed by GitHub
commit 754b4c0723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1064,8 +1064,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CastPass {
if_chain!{ if_chain!{
if let ty::RawPtr(from_ptr_ty) = &cast_from.sty; if let ty::RawPtr(from_ptr_ty) = &cast_from.sty;
if let ty::RawPtr(to_ptr_ty) = &cast_to.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(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(to_align) = cx.layout_of(to_ptr_ty.ty).ok().map(|a| a.align.abi);
if from_align < to_align; if from_align < to_align;
// with c_void, we inherently need to trust the user // with c_void, we inherently need to trust the user
if ! ( if ! (