2018-03-24 02:03:37 +00:00
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2018-05-03 13:24:50 +00:00
|
|
|
use std::io::Read;
|
2018-05-14 03:07:34 +00:00
|
|
|
use std::borrow::Borrow;
|
2018-05-03 13:24:50 +00:00
|
|
|
|
2018-03-24 02:03:37 +00:00
|
|
|
// @has foo/fn.foo.html
|
|
|
|
// @has - //pre 'foo('
|
2022-08-10 20:13:18 +00:00
|
|
|
// @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Clone\.html"'
|
|
|
|
// @matchesraw - '_z: .+impl.+trait\.Copy\.html.+, impl.+trait\.Clone\.html'
|
2018-03-24 02:03:37 +00:00
|
|
|
pub fn foo(_x: impl Clone, _y: i32, _z: (impl Copy, impl Clone)) {
|
|
|
|
}
|
|
|
|
|
|
|
|
pub trait Trait {
|
|
|
|
// @has foo/trait.Trait.html
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'method</a>('
|
|
|
|
// @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Debug\.html"'
|
2018-03-24 02:03:37 +00:00
|
|
|
fn method(&self, _x: impl std::fmt::Debug) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub struct S<T>(T);
|
|
|
|
|
|
|
|
impl<T> S<T> {
|
|
|
|
// @has foo/struct.S.html
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'bar</a>('
|
|
|
|
// @matchesraw - '_bar: impl <a class="trait" href="[^"]+/trait\.Copy\.html"'
|
2018-03-24 02:03:37 +00:00
|
|
|
pub fn bar(_bar: impl Copy) {
|
|
|
|
}
|
|
|
|
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'baz</a>('
|
|
|
|
// @matchesraw - '_baz:.+struct\.S\.html.+impl .+trait\.Clone\.html'
|
2018-03-24 02:03:37 +00:00
|
|
|
pub fn baz(_baz: S<impl Clone>) {
|
|
|
|
}
|
2018-05-03 13:24:50 +00:00
|
|
|
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'qux</a>('
|
|
|
|
// @matchesraw - 'trait\.Read\.html'
|
2018-05-03 13:24:50 +00:00
|
|
|
pub fn qux(_qux: impl IntoIterator<Item = S<impl Read>>) {
|
|
|
|
}
|
2018-03-24 02:03:37 +00:00
|
|
|
}
|
|
|
|
|
2022-08-10 20:13:18 +00:00
|
|
|
// @hasraw - 'method</a>('
|
|
|
|
// @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Debug\.html"'
|
2018-03-24 02:03:37 +00:00
|
|
|
impl<T> Trait for S<T> {}
|
2018-05-14 03:07:34 +00:00
|
|
|
|
|
|
|
// @has foo/fn.much_universe.html
|
2022-08-10 20:13:18 +00:00
|
|
|
// @matchesraw - 'T:.+Borrow.+impl .+trait\.Trait\.html'
|
|
|
|
// @matchesraw - 'U:.+IntoIterator.+= impl.+Iterator\.html.+= impl.+Clone\.html'
|
|
|
|
// @matchesraw - '_: impl .+trait\.Read\.html.+ \+ .+trait\.Clone\.html'
|
2018-05-14 03:07:34 +00:00
|
|
|
pub fn much_universe<
|
|
|
|
T: Borrow<impl Trait>,
|
|
|
|
U: IntoIterator<Item = impl Iterator<Item = impl Clone>>,
|
|
|
|
>(
|
|
|
|
_: impl Read + Clone,
|
|
|
|
) {
|
|
|
|
}
|