#![warn(clippy::rc_buffer)]

use std::ffi::OsString;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};

struct S {
    // triggers lint
    bad1: Arc<str>,
    //~^ rc_buffer
    bad2: Arc<std::path::Path>,
    //~^ rc_buffer
    bad3: Arc<[u8]>,
    //~^ rc_buffer
    bad4: Arc<std::ffi::OsStr>,
    //~^ rc_buffer
    // does not trigger lint
    good1: Arc<Mutex<String>>,
}

// triggers lint
fn func_bad1(_: Arc<str>) {}
//~^ rc_buffer
fn func_bad2(_: Arc<std::path::Path>) {}
//~^ rc_buffer
fn func_bad3(_: Arc<[u8]>) {}
//~^ rc_buffer
fn func_bad4(_: Arc<std::ffi::OsStr>) {}
//~^ rc_buffer
// does not trigger lint
fn func_good1(_: Arc<Mutex<String>>) {}

mod issue_15802 {
    fn foo(_: std::sync::Arc<[u8]>) {}
    //~^ rc_buffer
}

fn main() {}
