1 // NOTE: rustc cannot currently handle bounds of the form `for<'a> <Foo as Bar<'a>>::Assoc: Baz`.
2 // This should hopefully be fixed with Chalk.
4 #![feature(associated_type_bounds)]
15 impl<'a> Lam<&'a u8> for L1 {
21 impl<'a, 'b> Lam<&'a &'b u8> for L2 {
26 type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
27 //~^ ERROR `<<Self as Case1>::C as Iterator>::Item` is not an iterator
28 //~| ERROR `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
29 //~| ERROR `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
34 type C = Once<Once<L1>>;
37 fn assume_case1<T: Case1>() {
40 A: Iterator<Item = _0>,
44 assert_a::<_, T::A>();
48 B: Iterator<Item = _0>,
52 assert_b::<_, T::B>();
54 fn assert_c<_0, _1, _2, C>()
56 C: Clone + Iterator<Item = _2>,
57 _2: Send + Iterator<Item = _1>,
58 _1: for<'a> Lam<&'a u8, App = _0>,
62 assert_c::<_, _, _, T::C>();