about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-29 19:26:22 +0000
committerbors <bors@rust-lang.org>2022-08-29 19:26:22 +0000
commite1ecdb621c3a7e27f5a3ee5e309d40e2a51eac20 (patch)
tree79a112fd5e8f39bd328c96a45fffa24d3f4d2e30
parente9f7ce1f91b8c44cc6ff4f9ad213e36debc764d9 (diff)
parentc5a82304cf3ce4460df35a8cd0073c22bf0e5c64 (diff)
downloadrust-e1ecdb621c3a7e27f5a3ee5e309d40e2a51eac20.tar.gz
rust-e1ecdb621c3a7e27f5a3ee5e309d40e2a51eac20.zip
Auto merge of #9395 - Alexendoo:suspicious-to-owned-test, r=Manishearth
Fix `suspicious_to_owned` test when `c_char` is `u8`

e.g. on aarch64 linux

changelog: none
-rw-r--r--tests/ui/suspicious_to_owned.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ui/suspicious_to_owned.rs b/tests/ui/suspicious_to_owned.rs
index a90e78a0ea0..cba21bf4a93 100644
--- a/tests/ui/suspicious_to_owned.rs
+++ b/tests/ui/suspicious_to_owned.rs
@@ -2,12 +2,12 @@
 #![warn(clippy::implicit_clone)]
 #![allow(clippy::redundant_clone)]
 use std::borrow::Cow;
-use std::ffi::CStr;
+use std::ffi::{c_char, CStr};
 
 fn main() {
     let moo = "Moooo";
     let c_moo = b"Moooo\0";
-    let c_moo_ptr = c_moo.as_ptr() as *const i8;
+    let c_moo_ptr = c_moo.as_ptr() as *const c_char;
     let moos = ['M', 'o', 'o'];
     let moos_vec = moos.to_vec();