Skip to content

Commit 696a8e1

Browse files
skadeflip1995
andauthored
cast_ptr_alignment: State alignment unit in lint message
Co-Authored-By: Philipp Krones <hello@philkrones.com>
1 parent b290106 commit 696a8e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Casts {
12221222
cx,
12231223
CAST_PTR_ALIGNMENT,
12241224
expr.span,
1225-
&format!("casting from `{}` to a more-strictly-aligned pointer (`{}`) ({} < {})", cast_from, cast_to, from_align.bytes(), to_align.bytes())
1225+
&format!("casting from `{}` to a more-strictly-aligned pointer (`{}`) ({} < {} bytes)", cast_from, cast_to, from_align.bytes(), to_align.bytes())
12261226
);
12271227
}
12281228
}

0 commit comments

Comments
 (0)