Skip to content

Commit 0600de4

Browse files
committed
add cast kind of from_exposed_addr (int-to-ptr casts)
1 parent 86092a7 commit 0600de4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ fn check_rvalue<'tcx>(
131131
Rvalue::Cast(CastKind::Misc, operand, _) => {
132132
check_operand(tcx, operand, span, body)
133133
},
134-
Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer), operand, _) => {
134+
Rvalue::Cast(
135+
CastKind::PointerFromExposedAddress
136+
| CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer),
137+
operand,
138+
_
139+
) => {
135140
check_operand(tcx, operand, span, body)
136141
},
137142
Rvalue::Cast(

0 commit comments

Comments
 (0)