File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -602,8 +602,8 @@ declare_clippy_lint! {
602
602
/// Checks for the result of a `&self`-taking `as_ptr` being cast to a mutable pointer
603
603
///
604
604
/// ### Why is this bad?
605
- /// Since `as_ptr` took a `&self`, the pointer won't have write permissions, making it
606
- /// unlikely that having it as a mutable pointer is correct.
605
+ /// Since `as_ptr` takes a `&self`, the pointer won't have write permissions unless interior
606
+ /// mutability is used, making it unlikely that having it as a mutable pointer is correct.
607
607
///
608
608
/// ### Example
609
609
/// ```rust
@@ -620,7 +620,7 @@ declare_clippy_lint! {
620
620
#[ clippy:: version = "1.66.0" ]
621
621
pub AS_PTR_CAST_MUT ,
622
622
nursery,
623
- "casting the result of the `&self`-taking as_ptr to a mutabe point "
623
+ "casting the result of the `&self`-taking ` as_ptr` to a mutabe pointer "
624
624
}
625
625
626
626
pub struct Casts {
Original file line number Diff line number Diff line change 2
2
Checks for the result of a `&self`-taking `as_ptr` being cast to a mutable pointer
3
3
4
4
### Why is this bad?
5
- Since `as_ptr` took a `&self`, the pointer won't have write permissions, making it
6
- unlikely that having it as a mutable pointer is correct.
5
+ Since `as_ptr` takes a `&self`, the pointer won't have write permissions unless interior
6
+ mutability is used, making it unlikely that having it as a mutable pointer is correct.
7
7
8
8
### Example
9
9
```
You can’t perform that action at this time.
0 commit comments