Skip to content

Commit 765c6b8

Browse files
committed
A MIR transform that checks pointers are aligned
1 parent 58eb996 commit 765c6b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ fn check_rvalue<'tcx>(
169169
Err((span, "unsizing casts are not allowed in const fn".into()))
170170
}
171171
},
172-
Rvalue::Cast(CastKind::PointerExposeAddress, _, _) => {
172+
Rvalue::Cast(CastKind::PointerExposeAddress | CastKind::PointerAddress, _, _) => {
173173
Err((span, "casting pointers to ints is unstable in const fn".into()))
174174
},
175175
Rvalue::Cast(CastKind::DynStar, _, _) => {

0 commit comments

Comments
 (0)