rust/src/test/rustdoc/inline_cross/impl_trait.rs

41 lines
1.5 KiB
Rust
Raw Normal View History

// aux-build:impl_trait_aux.rs
2019-09-21 08:14:41 +00:00
// edition:2018
extern crate impl_trait_aux;
// @has impl_trait/fn.func.html
// @has - '//pre[@class="rust fn"]' "pub fn func<'a>(_x: impl Clone + Into<Vec<u8>> + 'a)"
// @!has - '//pre[@class="rust fn"]' 'where'
pub use impl_trait_aux::func;
// @has impl_trait/fn.func2.html
2019-07-08 20:42:45 +09:00
// @has - '//pre[@class="rust fn"]' "func2<T>("
// @has - '//pre[@class="rust fn"]' "_x: impl Deref<Target = Option<T>> + Iterator<Item = T>,"
// @has - '//pre[@class="rust fn"]' "_y: impl Iterator<Item = u8>)"
// @!has - '//pre[@class="rust fn"]' 'where'
pub use impl_trait_aux::func2;
2019-07-08 20:42:45 +09:00
// @has impl_trait/fn.func3.html
2019-07-08 20:45:59 +09:00
// @has - '//pre[@class="rust fn"]' "func3("
// @has - '//pre[@class="rust fn"]' "_x: impl Clone + Iterator<Item = impl Iterator<Item = u8>>)"
2019-07-08 20:42:45 +09:00
// @!has - '//pre[@class="rust fn"]' 'where'
pub use impl_trait_aux::func3;
// @has impl_trait/fn.func4.html
// @has - '//pre[@class="rust fn"]' "func4<T>("
// @has - '//pre[@class="rust fn"]' "T: Iterator<Item = impl Clone>,"
pub use impl_trait_aux::func4;
2019-09-21 08:14:41 +00:00
// @has impl_trait/fn.async_fn.html
// @has - '//pre[@class="rust fn"]' "pub async fn async_fn()"
pub use impl_trait_aux::async_fn;
// @has impl_trait/struct.Foo.html
2020-06-27 18:27:03 +02:00
// @has - '//*[@id="method.method"]//code' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a)"
// @!has - '//*[@id="method.method"]//code' 'where'
pub use impl_trait_aux::Foo;
2019-09-21 08:14:41 +00:00
// @has impl_trait/struct.Bar.html
// @has - '//*[@id="method.async_foo"]' "pub async fn async_foo("
pub use impl_trait_aux::Bar;