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

pub trait Trait {
    fn foo(&self) -> Self
    where
        Self: Sized;
}

pub fn static_foo<T: Trait + ?Sized>(_b: &T) {}

pub fn dynamic_bar(a: &dyn Trait) {
    static_foo(a)
}