Skip to content

Commit 94e586e

Browse files
committed
actually appease CI
I should always run cargo test before committing 😅
1 parent 5adb270 commit 94e586e

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

tests/ui/as_ptr_cast_mut.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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

65
struct MutPtrWrapper(Vec<u8>);
76
impl MutPtrWrapper {

tests/ui/as_ptr_cast_mut.stderr

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,5 @@ error: casting the result of `as_ptr` to *mut i8
1212
LL | 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

0 commit comments

Comments
 (0)