blob: 84e628e218561835c0559c0448ee25ecd4b0f6e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Check that we require that associated types in an impl are well-formed.
#![allow(dead_code)]
pub trait MyHash { }
pub struct MySet<T:MyHash> {
data: Vec<T>
}
pub trait Foo {
type Bar;
}
impl<T> Foo for T {
type Bar = MySet<T>;
//~^ ERROR the trait bound `T: MyHash` is not satisfied
}
fn main() { }
|