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 16:23:42 +00:00
x: 3
2022-08-17 04:57:17 +00:00
//~^ ERROR E0277
};
let baz: Foo<usize> = loop { };
//~^ ERROR E0277
}