]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/inline_cross/impl_trait.rs
7d810ab4813720120026e9f21a4c8fd0f15d0561
[rust.git] / tests / rustdoc / inline_cross / impl_trait.rs
1 // aux-build:impl_trait_aux.rs
2 // edition:2018
3
4 extern crate impl_trait_aux;
5
6 // @has impl_trait/fn.func.html
7 // @has - '//pre[@class="rust item-decl"]' "pub fn func<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
8 // @!has - '//pre[@class="rust item-decl"]' 'where'
9 pub use impl_trait_aux::func;
10
11 // @has impl_trait/fn.func2.html
12 // @has - '//pre[@class="rust item-decl"]' "func2<T>("
13 // @has - '//pre[@class="rust item-decl"]' "_x: impl Deref<Target = Option<T>> + Iterator<Item = T>,"
14 // @has - '//pre[@class="rust item-decl"]' "_y: impl Iterator<Item = u8>)"
15 // @!has - '//pre[@class="rust item-decl"]' 'where'
16 pub use impl_trait_aux::func2;
17
18 // @has impl_trait/fn.func3.html
19 // @has - '//pre[@class="rust item-decl"]' "func3("
20 // @has - '//pre[@class="rust item-decl"]' "_x: impl Iterator<Item = impl Iterator<Item = u8>> + Clone)"
21 // @!has - '//pre[@class="rust item-decl"]' 'where'
22 pub use impl_trait_aux::func3;
23
24 // @has impl_trait/fn.func4.html
25 // @has - '//pre[@class="rust item-decl"]' "func4<T>("
26 // @has - '//pre[@class="rust item-decl"]' "T: Iterator<Item = impl Clone>,"
27 pub use impl_trait_aux::func4;
28
29 // @has impl_trait/fn.func5.html
30 // @has - '//pre[@class="rust item-decl"]' "func5("
31 // @has - '//pre[@class="rust item-decl"]' "_f: impl for<'any> Fn(&'any str, &'any str) -> bool + for<'r> Other<T<'r> = ()>,"
32 // @has - '//pre[@class="rust item-decl"]' "_a: impl for<'alpha, 'beta> Auxiliary<'alpha, Item<'beta> = fn(_: &'beta ())>"
33 // @!has - '//pre[@class="rust item-decl"]' 'where'
34 pub use impl_trait_aux::func5;
35
36 // @has impl_trait/fn.async_fn.html
37 // @has - '//pre[@class="rust item-decl"]' "pub async fn async_fn()"
38 pub use impl_trait_aux::async_fn;
39
40 // @has impl_trait/struct.Foo.html
41 // @has - '//*[@id="method.method"]//h4[@class="code-header"]' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
42 // @!has - '//*[@id="method.method"]//h4[@class="code-header"]' 'where'
43 pub use impl_trait_aux::Foo;
44
45 // @has impl_trait/struct.Bar.html
46 // @has - '//*[@id="method.async_foo"]' "pub async fn async_foo("
47 pub use impl_trait_aux::Bar;