Skip to content

Commit baacbfd

Browse files
authored
Rollup merge of #97653 - RalfJung:int-to-ptr, r=oli-obk
add cast kind of from_exposed_addr (int-to-ptr casts) This is basically the dual to #97582, for int2ptr casts. Cc `@tmiasko` #97649
2 parents 2a18d12 + 0600de4 commit baacbfd

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)