rust/tests/ui/traits/issue-21837.rs

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

11 lines
223 B
Rust
Raw Normal View History

2016-10-03 12:46:21 +00:00
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() {}