aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/derive_macro1.rs
blob: 8c42abae2d1a6299ec5249ab3ed2ad738ace12f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[lang = "sized"]
pub trait Sized {}

#[lang = "clone"]
pub trait Clone {
    fn clone(&self) -> Self;
}

// This warning can be removed once we properly handle implems with #[automatically_derived]
#[derive(Clone)]
pub struct S;

fn main() {
    let s = S;
    let _s_clone = s.clone();
}