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

pub trait Clone {
    fn clone(&self) -> Self;
}

// This warning can be removed once we properly handle implems with #[automatically_derived]
#[derive(Clone)] // { dg-warning "unused name .self." }
pub struct S;

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