2019-09-21 03:14:41 -05:00
|
|
|
// edition:2018
|
|
|
|
|
2019-07-08 03:59:26 -05:00
|
|
|
use std::ops::Deref;
|
|
|
|
|
2019-06-20 22:23:05 -05:00
|
|
|
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 03:59:26 -05:00
|
|
|
|
2019-07-08 06:42:45 -05:00
|
|
|
pub fn func3(_x: impl Iterator<Item = impl Iterator<Item = u8>> + Clone) {}
|
|
|
|
|
2019-07-09 02:59:34 -05:00
|
|
|
pub fn func4<T: Iterator<Item = impl Clone>>(_x: T) {}
|
|
|
|
|
2022-10-04 07:08:25 -05:00
|
|
|
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() {}
|
|
|
|
|
2019-06-20 22:23:05 -05:00
|
|
|
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) {}
|
|
|
|
}
|