aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-3144.rs
blob: 4e61078a0dcc4291eb635f302366cd4ece126f08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#[lang = "sized"]
pub trait Sized {}

#[lang = "copy"]
trait Copy {}

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

impl Clone for i32 {
    fn clone(&self) -> i32 {
        *self
    }
}

struct S {}

#[derive(Clone, Copy)]
// { dg-error {bounds not satisfied for S .Clone. is not satisfied .E0277.} "" { target *-*-* } .-1 }
struct S2 {
    a: i32,
    s: S,
}

fn main() -> i32 {
    0
}