2019-05-06 21:41:05 +02:00
|
|
|
// normalize-stderr-test "\(\d+ byte\)" -> "(N byte)"
|
|
|
|
// normalize-stderr-test "\(limit: \d+ byte\)" -> "(limit: N byte)"
|
|
|
|
|
2020-04-03 03:46:01 +02:00
|
|
|
#![deny(clippy::trivially_copy_pass_by_ref)]
|
2018-08-01 22:38:04 +02:00
|
|
|
#![allow(clippy::many_single_char_names)]
|
2018-05-27 16:04:45 +02:00
|
|
|
|
|
|
|
#[derive(Copy, Clone)]
|
|
|
|
struct Foo(u8);
|
|
|
|
|
|
|
|
#[derive(Copy, Clone)]
|
|
|
|
struct Bar(u32);
|
|
|
|
|
2018-12-09 23:26:16 +01:00
|
|
|
fn good(a: &mut u32, b: u32, c: &Bar, d: &u32) {}
|
2018-05-27 16:04:45 +02:00
|
|
|
|
2018-12-09 23:26:16 +01:00
|
|
|
fn bad(x: &u16, y: &Foo) {}
|
2018-05-27 16:04:45 +02:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let (mut a, b, c, d, x, y) = (0, 0, Bar(0), 0, 0, Foo(0));
|
|
|
|
good(&mut a, b, &c, &d);
|
|
|
|
bad(&x, &y);
|
|
|
|
}
|