Skip to content

Commit

Permalink
Rollup merge of #118888 - compiler-errors:uplift-more-things, r=jackh726
Browse files Browse the repository at this point in the history
Uplift `TypeAndMut` and `ClosureKind` to `rustc_type_ir`

Uplifts `TypeAndMut` and `ClosureKind`

I know I said I was just going to get rid of `TypeAndMut` (rust-lang/types-team#124) but I think this is much simpler, lol

r? `@jackh726` or `@lcnr`
  • Loading branch information
matthiaskrgr authored Dec 15, 2023
2 parents fe37cc1 + 20de341 commit f90e8ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/casts/as_ptr_cast_mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use super::AS_PTR_CAST_MUT;

pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_to: Ty<'_>) {
if let ty::RawPtr(
ptrty @ TypeAndMut {
mutbl: Mutability::Mut, ..
TypeAndMut {
mutbl: Mutability::Mut, ty: ptrty,
},
) = cast_to.kind()
&& let ty::RawPtr(TypeAndMut {
Expand All @@ -34,7 +34,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>,
cx,
AS_PTR_CAST_MUT,
expr.span,
&format!("casting the result of `as_ptr` to *{ptrty}"),
&format!("casting the result of `as_ptr` to *mut {ptrty}"),
"replace with",
format!("{recv}.as_mut_ptr()"),
applicability,
Expand Down

0 comments on commit f90e8ef

Please sign in to comment.