rust/tests/ui-toml/toml_trivially_copy/test.rs

18 lines
327 B
Rust
Raw Normal View History

2018-08-01 15:38:04 -05:00
#![allow(clippy::many_single_char_names)]
#[derive(Copy, Clone)]
struct Foo(u8);
#[derive(Copy, Clone)]
struct Bar(u32);
2018-12-09 16:26:16 -06:00
fn good(a: &mut u32, b: u32, c: &Bar, d: &u32) {}
2018-12-09 16:26:16 -06:00
fn bad(x: &u16, y: &Foo) {}
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);
}