#![warn(clippy::needless_pass_by_ref_mut)]
#![allow(clippy::ptr_arg)]

// Should warn
pub fn pub_foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
    //~^ ERROR: this argument is a mutable reference, but not used mutably
    *x += *b + s.len() as u32;
}

fn main() {}
