]> git.proxmox.com Git - rustc.git/blob - tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs
New upstream version 1.75.0+dfsg1
[rustc.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<'beta, 'alpha, '_gamma> 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 }