]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/inline_cross/auxiliary/assoc_item_trait_bounds.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / rustdoc / inline_cross / auxiliary / assoc_item_trait_bounds.rs
1 pub trait Main {
2     type Item;
3
4     type Out0: Support<Item = ()>;
5     type Out1: Support<Item = Self::Item>;
6     type Out2<T>: Support<Item = T>;
7     type Out3: Support<Produce<()> = bool>;
8     type Out4<T>: Support<Produce<T> = T>;
9     type Out5: Support<Output<'static> = &'static ()>;
10     type Out6: for<'a> Support<Output<'a> = &'a ()>;
11     type Out7: Support<Item = String, Produce<i32> = u32> + Unrelated;
12     type Out8: Unrelated + Protocol<i16, Q1 = u128, Q0 = ()>;
13     type Out9: FnMut(i32) -> bool + Clone;
14     type Out10<'q>: Support<Output<'q> = ()>;
15     type Out11: for<'r, 's> Helper<A<'s> = &'s (), B<'r> = ()>;
16     type Out12: for<'w> Helper<B<'w> = std::borrow::Cow<'w, str>, A<'w> = bool>;
17     type Out13: for<'fst, 'snd> Aid<'snd, Result<'fst> = &'fst mut str>;
18     type Out14<P: Copy + Eq, Q: ?Sized>;
19
20     fn make<F>(_: F, _: impl FnMut(&str) -> bool)
21     where
22         F: FnOnce(u32) -> String,
23         Self::Out2<()>: Protocol<u8, Q0 = Self::Item, Q1 = ()>;
24 }
25
26 pub trait Support {
27     type Item;
28     type Output<'a>;
29     type Produce<T>;
30 }
31
32 pub trait Protocol<K> {
33     type Q0;
34     type Q1;
35 }
36
37 pub trait Unrelated {}
38
39 pub trait Helper {
40     type A<'q>;
41     type B<'q>;
42 }
43
44 pub trait Aid<'src> {
45     type Result<'inter: 'src>;
46 }