]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs
Merge commit '7f27e2e74ef957baa382dc05cf08df6368165c74' into clippyup
[rust.git] / tests / rustdoc / inline_cross / auxiliary / impl_trait_aux.rs
1 // edition:2018
2
3 use std::ops::Deref;
4
5 pub fn func<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
6
7 pub fn func2<T>(
8     _x: impl Deref<Target = Option<T>> + Iterator<Item = T>,
9     _y: impl Iterator<Item = u8>,
10 ) {}
11
12 pub fn func3(_x: impl Iterator<Item = impl Iterator<Item = u8>> + Clone) {}
13
14 pub fn func4<T: Iterator<Item = impl Clone>>(_x: T) {}
15
16 pub fn func5(
17     _f: impl for<'any> Fn(&'any str, &'any str) -> bool + for<'r> Other<T<'r> = ()>,
18     _a: impl for<'alpha, 'beta> Auxiliary<'alpha, Item<'beta> = fn(&'beta ())>,
19 ) {}
20
21 pub trait Other {
22     type T<'dependency>;
23 }
24
25 pub trait Auxiliary<'arena> {
26     type Item<'input>;
27 }
28
29 pub async fn async_fn() {}
30
31 pub struct Foo;
32
33 impl Foo {
34     pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
35 }
36
37 pub struct Bar;
38
39 impl Bar {
40     pub async fn async_foo(&self) {}
41 }