about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCentri3 <114838443+Centri3@users.noreply.github.com>2023-05-24 11:06:56 -0500
committerCentri3 <114838443+Centri3@users.noreply.github.com>2023-05-24 11:06:56 -0500
commit94e586e85d8ecc278ed8766ffafdc39d41583b4e (patch)
treee5ec425b8dfc4bd6367eaca10fa894680f10b9a4
parent5adb270c8d9aa8d32acbb2a2ba343102d1bb1c76 (diff)
downloadrust-94e586e85d8ecc278ed8766ffafdc39d41583b4e.tar.gz
rust-94e586e85d8ecc278ed8766ffafdc39d41583b4e.zip
actually appease CI
I should always run cargo test before committing :sweat_smile:
-rw-r--r--tests/ui/as_ptr_cast_mut.rs3
-rw-r--r--tests/ui/as_ptr_cast_mut.stderr16
2 files changed, 2 insertions, 17 deletions
diff --git a/tests/ui/as_ptr_cast_mut.rs b/tests/ui/as_ptr_cast_mut.rs
index 9389426238c..7d71947e428 100644
--- a/tests/ui/as_ptr_cast_mut.rs
+++ b/tests/ui/as_ptr_cast_mut.rs
@@ -1,7 +1,6 @@
-//@run-rustfix
 #![allow(unused)]
 #![warn(clippy::as_ptr_cast_mut)]
-#![allow(clippy::wrong_self_convention)]
+#![allow(clippy::wrong_self_convention, clippy::unnecessary_cast)]
 
 struct MutPtrWrapper(Vec<u8>);
 impl MutPtrWrapper {
diff --git a/tests/ui/as_ptr_cast_mut.stderr b/tests/ui/as_ptr_cast_mut.stderr
index c45d669fd73..2189c3d2f85 100644
--- a/tests/ui/as_ptr_cast_mut.stderr
+++ b/tests/ui/as_ptr_cast_mut.stderr
@@ -12,19 +12,5 @@ error: casting the result of `as_ptr` to *mut i8
 LL |     let _: *mut i8 = string.as_ptr() as *mut _;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `string.as_mut_ptr()`
 
-error: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)
-  --> $DIR/as_ptr_cast_mut.rs:25:13
-   |
-LL |     let _ = string.as_mut_ptr() as *mut u8;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `string.as_mut_ptr()`
-   |
-   = note: `-D clippy::unnecessary-cast` implied by `-D warnings`
-
-error: casting raw pointers to the same type and constness is unnecessary (`*mut u8` -> `*mut u8`)
-  --> $DIR/as_ptr_cast_mut.rs:29:13
-   |
-LL |     let _ = nn.as_ptr() as *mut u8;
-   |             ^^^^^^^^^^^^^^^^^^^^^^ help: try: `nn.as_ptr()`
-
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors