summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/bound/on-structs-and-enums-rpass.rs
blob: 4dc4fecc91fcfc36da7c098a8e737296bfc54959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// run-pass
#![allow(dead_code)]
#![allow(unused_variables)]
// pretty-expanded FIXME #23616

trait U {}
trait T<X: U> { fn get(self) -> X; }

trait S2<Y: U> {
    fn m(x: Box<dyn T<Y>+'static>) {}
}

struct St<X: U> {
    f: Box<dyn T<X>+'static>,
}

impl<X: U> St<X> {
    fn blah() {}
}

fn main() {}