rust/tests/ui/traits/bound/on-structs-and-enums-locals.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
209 B
Rust
Raw Normal View History

trait Trait {
fn dummy(&self) { }
}
struct Foo<T:Trait> {
x: T,
}
fn main() {
let foo = Foo {
2015-01-31 10:23:42 -06:00
x: 3
2022-08-16 23:57:17 -05:00
//~^ ERROR E0277
};
let baz: Foo<usize> = loop { };
//~^ ERROR E0277
}