4 use std::borrow::Borrow;
6 // @has foo/fn.foo.html
8 // @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Clone\.html"'
9 // @matchesraw - '_z: .+impl.+trait\.Copy\.html.+, impl.+trait\.Clone\.html'
10 pub fn foo(_x: impl Clone, _y: i32, _z: (impl Copy, impl Clone)) {
14 // @has foo/trait.Trait.html
15 // @hasraw - 'method</a>('
16 // @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Debug\.html"'
17 fn method(&self, _x: impl std::fmt::Debug) {
24 // @has foo/struct.S.html
25 // @hasraw - 'bar</a>('
26 // @matchesraw - '_bar: impl <a class="trait" href="[^"]+/trait\.Copy\.html"'
27 pub fn bar(_bar: impl Copy) {
30 // @hasraw - 'baz</a>('
31 // @matchesraw - '_baz:.+struct\.S\.html.+impl .+trait\.Clone\.html'
32 pub fn baz(_baz: S<impl Clone>) {
35 // @hasraw - 'qux</a>('
36 // @matchesraw - 'trait\.Read\.html'
37 pub fn qux(_qux: impl IntoIterator<Item = S<impl Read>>) {
41 // @hasraw - 'method</a>('
42 // @matchesraw - '_x: impl <a class="trait" href="[^"]+/trait\.Debug\.html"'
43 impl<T> Trait for S<T> {}
45 // @has foo/fn.much_universe.html
46 // @matchesraw - 'T:.+Borrow.+impl .+trait\.Trait\.html'
47 // @matchesraw - 'U:.+IntoIterator.+= impl.+Iterator\.html.+= impl.+Clone\.html'
48 // @matchesraw - '_: impl .+trait\.Read\.html.+ \+ .+trait\.Clone\.html'
50 T: Borrow<impl Trait>,
51 U: IntoIterator<Item = impl Iterator<Item = impl Clone>>,