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.
3 // ignore-compare-mode-chalk
5 #![feature(associated_type_bounds)]
16 impl<'a> Lam<&'a u8> for L1 {
22 impl<'a, 'b> Lam<&'a &'b u8> for L2 {
27 type C: Clone + Iterator<Item: Send + Iterator<Item: for<'a> Lam<&'a u8, App: Debug>> + Sync>;
28 //~^ ERROR `<<Self as Case1>::C as Iterator>::Item` is not an iterator
29 //~| ERROR `<<Self as Case1>::C as Iterator>::Item` cannot be sent between threads safely
30 //~| ERROR `<<Self as Case1>::C as Iterator>::Item` cannot be shared between threads safely
35 type C = Once<Once<L1>>;
38 fn assume_case1<T: Case1>() {
41 A: Iterator<Item = _0>,
45 assert_a::<_, T::A>();
49 B: Iterator<Item = _0>,
53 assert_b::<_, T::B>();
55 fn assert_c<_0, _1, _2, C>()
57 C: Clone + Iterator<Item = _2>,
58 _2: Send + Iterator<Item = _1>,
59 _1: for<'a> Lam<&'a u8, App = _0>,
63 assert_c::<_, _, _, T::C>();