Skip to content

Commit 6d7b26d

Browse files
committed
Auto merge of #118966 - matthiaskrgr:rollup-sdvjwy6, r=matthiaskrgr
Rollup of 3 pull requests Successful merges: - #116888 (Add discussion that concurrent access to the environment is unsafe) - #118888 (Uplift `TypeAndMut` and `ClosureKind` to `rustc_type_ir`) - #118929 (coverage: Tidy up early parts of the instrumentor pass) r? `@ghost` `@rustbot` modify labels: rollup
2 parents a25fb19 + e9bfd38 commit 6d7b26d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/casts/as_ptr_cast_mut.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use super::AS_PTR_CAST_MUT;
1010

1111
pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_to: Ty<'_>) {
1212
if let ty::RawPtr(
13-
ptrty @ TypeAndMut {
14-
mutbl: Mutability::Mut, ..
13+
TypeAndMut {
14+
mutbl: Mutability::Mut, ty: ptrty,
1515
},
1616
) = cast_to.kind()
1717
&& let ty::RawPtr(TypeAndMut {
@@ -34,7 +34,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>,
3434
cx,
3535
AS_PTR_CAST_MUT,
3636
expr.span,
37-
&format!("casting the result of `as_ptr` to *{ptrty}"),
37+
&format!("casting the result of `as_ptr` to *mut {ptrty}"),
3838
"replace with",
3939
format!("{recv}.as_mut_ptr()"),
4040
applicability,

0 commit comments

Comments
 (0)