summaryrefslogtreecommitdiffstats
path: root/src/test/ui/traits/bound/on-structs-and-enums-locals.rs
blob: 21c0ce80f8a8d5fca47da519a3e9ea30be7cec16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
trait Trait {
    fn dummy(&self) { }
}

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

fn main() {
    let foo = Foo {
    //~^ ERROR E0277
        x: 3
    };

    let baz: Foo<usize> = loop { };
    //~^ ERROR E0277
}