Skip to content

Commit

Permalink
cast_ptr_alignment: State alignment unit in lint message
Browse files Browse the repository at this point in the history
Co-Authored-By: Philipp Krones <hello@philkrones.com>
  • Loading branch information
skade and flip1995 committed Jul 7, 2019
1 parent b290106 commit 696a8e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Casts {
cx,
CAST_PTR_ALIGNMENT,
expr.span,
&format!("casting from `{}` to a more-strictly-aligned pointer (`{}`) ({} < {})", cast_from, cast_to, from_align.bytes(), to_align.bytes())
&format!("casting from `{}` to a more-strictly-aligned pointer (`{}`) ({} < {} bytes)", cast_from, cast_to, from_align.bytes(), to_align.bytes())
);
}
}
Expand Down

0 comments on commit 696a8e1

Please sign in to comment.