rust/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
822 B
Rust
Raw Normal View History

2019-09-21 03:14:41 -05:00
// edition:2018
use std::ops::Deref;
pub fn func<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
2019-07-08 06:45:59 -05:00
pub fn func2<T>(
_x: impl Deref<Target = Option<T>> + Iterator<Item = T>,
_y: impl Iterator<Item = u8>,
) {}
2019-07-08 06:42:45 -05:00
pub fn func3(_x: impl Iterator<Item = impl Iterator<Item = u8>> + Clone) {}
pub fn func4<T: Iterator<Item = impl Clone>>(_x: T) {}
pub fn func5(
_f: impl for<'any> Fn(&'any str, &'any str) -> bool + for<'r> Other<T<'r> = ()>,
_a: impl for<'alpha, 'beta> Auxiliary<'alpha, Item<'beta> = fn(&'beta ())>,
) {}
pub trait Other {
type T<'dependency>;
}
pub trait Auxiliary<'arena> {
type Item<'input>;
}
2019-09-21 03:14:41 -05:00
pub async fn async_fn() {}
pub struct Foo;
impl Foo {
pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {}
}
2019-09-21 03:14:41 -05:00
pub struct Bar;
impl Bar {
pub async fn async_foo(&self) {}
}