summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/bound/on-structs-and-enums-in-fns.rs
blob: 6a6fcf5301d2066cc4b7e05e8c7abed90acdaebf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
trait Trait {}

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

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

fn explode(x: Foo<u32>) {}
//~^ ERROR E0277

fn kaboom(y: Bar<f32>) {}
//~^ ERROR E0277

fn main() {
}