Skip to content

Commit e1ecdb6

Browse files
committed
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
2 parents e9f7ce1 + c5a8230 commit e1ecdb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ui/suspicious_to_owned.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
#![warn(clippy::implicit_clone)]
33
#![allow(clippy::redundant_clone)]
44
use std::borrow::Cow;
5-
use std::ffi::CStr;
5+
use std::ffi::{c_char, CStr};
66

77
fn main() {
88
let moo = "Moooo";
99
let c_moo = b"Moooo\0";
10-
let c_moo_ptr = c_moo.as_ptr() as *const i8;
10+
let c_moo_ptr = c_moo.as_ptr() as *const c_char;
1111
let moos = ['M', 'o', 'o'];
1212
let moos_vec = moos.to_vec();
1313

0 commit comments

Comments
 (0)