File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change 1
- //@run-rustfix
2
1
#![ allow( unused) ]
3
2
#![ warn( clippy:: as_ptr_cast_mut) ]
4
- #![ allow( clippy:: wrong_self_convention) ]
3
+ #![ allow( clippy:: wrong_self_convention, clippy :: unnecessary_cast ) ]
5
4
6
5
struct MutPtrWrapper ( Vec < u8 > ) ;
7
6
impl MutPtrWrapper {
Original file line number Diff line number Diff line change @@ -12,19 +12,5 @@ error: casting the result of `as_ptr` to *mut i8
12
12
LL | let _: *mut i8 = string.as_ptr() as *mut _;
13
13
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
14
14
15
- error: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)
16
- --> $DIR/as_ptr_cast_mut.rs:25:13
17
- |
18
- LL | let _ = string.as_mut_ptr() as *mut u8;
19
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string.as_mut_ptr()`
20
- |
21
- = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
22
-
23
- error: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)
24
- --> $DIR/as_ptr_cast_mut.rs:29:13
25
- |
26
- LL | let _ = nn.as_ptr() as *mut u8;
27
- | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `nn.as_ptr()`
28
-
29
- error: aborting due to 4 previous errors
15
+ error: aborting due to 2 previous errors
30
16
You can’t perform that action at this time.
0 commit comments