]> git.proxmox.com Git - rustc.git/blame - tests/rustdoc/inline_cross/impl_trait.rs
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / rustdoc / inline_cross / impl_trait.rs
CommitLineData
9c376795
FG
1// aux-build:impl_trait_aux.rs
2// edition:2018
3
4extern crate impl_trait_aux;
5
6// @has impl_trait/fn.func.html
9ffffee4
FG
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'
9c376795
FG
9pub use impl_trait_aux::func;
10
11// @has impl_trait/fn.func2.html
9ffffee4
FG
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'
9c376795
FG
16pub use impl_trait_aux::func2;
17
18// @has impl_trait/fn.func3.html
9ffffee4
FG
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'
9c376795
FG
22pub use impl_trait_aux::func3;
23
24// @has impl_trait/fn.func4.html
9ffffee4
FG
25// @has - '//pre[@class="rust item-decl"]' "func4<T>("
26// @has - '//pre[@class="rust item-decl"]' "T: Iterator<Item = impl Clone>,"
9c376795
FG
27pub use impl_trait_aux::func4;
28
29// @has impl_trait/fn.func5.html
9ffffee4
FG
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'
9c376795
FG
34pub use impl_trait_aux::func5;
35
36// @has impl_trait/fn.async_fn.html
9ffffee4 37// @has - '//pre[@class="rust item-decl"]' "pub async fn async_fn()"
9c376795
FG
38pub 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'
43pub use impl_trait_aux::Foo;
44
45// @has impl_trait/struct.Bar.html
46// @has - '//*[@id="method.async_foo"]' "pub async fn async_foo("
47pub use impl_trait_aux::Bar;