Skip to content

Commit

Permalink
Rollup merge of rust-lang#102675 - ouz-a:mir-technical-debt, r=oli-obk
Browse files Browse the repository at this point in the history
Remove `mir::CastKind::Misc`

As discussed in rust-lang#97649 `mir::CastKind::Misc` is not clear, this PR addresses that by creating a new enum variant for every valid cast.

r? ````@oli-obk````
  • Loading branch information
matthiaskrgr authored Oct 8, 2022
2 parents 7c372cd + 13dbc33 commit 4013d36
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 @@ -129,7 +129,12 @@ fn check_rvalue<'tcx>(
| Rvalue::Use(operand)
| Rvalue::Cast(
CastKind::PointerFromExposedAddress
| CastKind::Misc
| CastKind::IntToInt
| CastKind::FloatToInt
| CastKind::IntToFloat
| CastKind::FloatToFloat
| CastKind::FnPtrToPtr
| CastKind::PtrToPtr
| CastKind::Pointer(PointerCast::MutToConstPointer | PointerCast::ArrayToPointer),
operand,
_,
Expand Down

0 comments on commit 4013d36

Please sign in to comment.