diff options
| author | Ralf Jung <post@ralfj.de> | 2022-06-02 09:05:37 -0400 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-06-02 10:46:13 -0400 |
| commit | 0600de4d127ce56984f90674c5dfff9b91bb6ba3 (patch) | |
| tree | f16c64b76dd182500f72a504e5d15ae18c0561b6 | |
| parent | 86092a77b343474562780e2731ee430059e20570 (diff) | |
| download | rust-0600de4d127ce56984f90674c5dfff9b91bb6ba3.tar.gz rust-0600de4d127ce56984f90674c5dfff9b91bb6ba3.zip | |
add cast kind of from_exposed_addr (int-to-ptr casts)
| -rw-r--r-- | clippy_utils/src/qualify_min_const_fn.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs index b1c82ac76e8..58abef38ea8 100644 --- a/clippy_utils/src/qualify_min_const_fn.rs +++ b/clippy_utils/src/qualify_min_const_fn.rs @@ -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( |
