Skip to content

Commit

Permalink
Auto merge of rust-lang#9395 - Alexendoo:suspicious-to-owned-test, r=…
Browse files Browse the repository at this point in the history
…Manishearth

Fix `suspicious_to_owned` test when `c_char` is `u8`

e.g. on aarch64 linux

changelog: none
  • Loading branch information
bors committed Aug 29, 2022
2 parents e9f7ce1 + c5a8230 commit e1ecdb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ui/suspicious_to_owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit e1ecdb6

Please sign in to comment.