Skip to content

Commit

Permalink
Rollup merge of #97653 - RalfJung:int-to-ptr, r=oli-obk
Browse files Browse the repository at this point in the history
add cast kind of from_exposed_addr (int-to-ptr casts)

This is basically the dual to rust-lang/rust#97582, for int2ptr casts.

Cc `@tmiasko` rust-lang/rust#97649
  • Loading branch information
Dylan-DPC authored Jun 3, 2022
2 parents 2a18d12 + 0600de4 commit baacbfd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clippy_utils/src/qualify_min_const_fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ fn check_rvalue<'tcx>(
Rvalue::Cast(CastKind::Misc, operand, _) => {
check_operand(tcx, operand, span, body)
},
Rvalue::Cast(CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer), operand, _) => {
Rvalue::Cast(
CastKind::PointerFromExposedAddress
| CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer),
operand,
_
) => {
check_operand(tcx, operand, span, body)
},
Rvalue::Cast(
Expand Down

0 comments on commit baacbfd

Please sign in to comment.