summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/bound/on-structs-and-enums-in-impls.rs
blob: d379499521c7cbc06374984f93550700a657429e (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
trait Trait {}

struct Foo<T:Trait> {
    x: T,
}

enum Bar<T:Trait> {
    ABar(isize),
    BBar(T),
    CBar(usize),
}

trait PolyTrait<T>
{
    fn whatever(&self, t: T) {}
}

struct Struct;

impl PolyTrait<Foo<u16>> for Struct {
//~^ ERROR E0277
}

fn main() {
}