mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
10 lines
223 B
Rust
10 lines
223 B
Rust
pub trait Bound {}
|
|
pub struct Foo<T: Bound>(T);
|
|
|
|
pub trait Trait1 {}
|
|
impl<T: Bound> Trait1 for Foo<T> {}
|
|
|
|
pub trait Trait2 {}
|
|
impl<T> Trait2 for Foo<T> {} //~ ERROR the trait bound `T: Bound` is not satisfied
|
|
|
|
fn main() {}
|