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
21#![ allow( unused) ]
32#![ warn( clippy:: as_ptr_cast_mut) ]
4- #![ allow( clippy:: wrong_self_convention) ]
3+ #![ allow( clippy:: wrong_self_convention, clippy :: unnecessary_cast ) ]
54
65struct MutPtrWrapper ( Vec < u8 > ) ;
76impl 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
1212LL | let _: *mut i8 = string.as_ptr() as *mut _;
1313 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
1414
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
3016
You can’t perform that action at this time.
0 commit comments