mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
Rollup merge of #118888 - compiler-errors:uplift-more-things, r=jackh726
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` (https://github.com/rust-lang/types-team/issues/124) but I think this is much simpler, lol r? `@jackh726` or `@lcnr`
This commit is contained in:
commit
f90e8ef6b8
1 changed files with 3 additions and 3 deletions
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue