mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
21 lines
224 B
Rust
21 lines
224 B
Rust
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() {
|
|
}
|