rust/src/test/ui/issues/issue-21837.rs
2018-12-25 21:08:33 -07:00

11 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() {}