]>
git.proxmox.com Git - rustc.git/blob - src/test/rustdoc/assoc-types.rs
3 // @has assoc_types/trait.Index.html
4 pub trait Index
<I
: ?Sized
> {
5 // @has - '//*[@id="associatedtype.Output"]//h4[@class="code-header"]' 'type Output: ?Sized'
7 // @has - '//*[@id="tymethod.index"]//h4[@class="code-header"]' \
8 // "fn index<'a>(&'a self, index: I) -> &'a Self::Output"
9 // @has - '//*[@id="tymethod.index"]//h4[@class="code-header"]//a[@href="trait.Index.html#associatedtype.Output"]' \
11 fn index
<'a
>(&'a
self, index
: I
) -> &'a
Self::Output
;
14 // @has assoc_types/fn.use_output.html
15 // @has - '//*[@class="rust fn"]' '-> &T::Output'
16 // @has - '//*[@class="rust fn"]//a[@href="trait.Index.html#associatedtype.Output"]' 'Output'
17 pub fn use_output
<T
: Index
<usize>>(obj
: &T
, index
: usize) -> &T
::Output
{
25 // @has assoc_types/fn.use_input.html
26 // @has - '//*[@class="rust fn"]' 'T::Input'
27 // @has - '//*[@class="rust fn"]//a[@href="trait.Feed.html#associatedtype.Input"]' 'Input'
28 pub fn use_input
<T
: Feed
>(_feed
: &T
, _element
: T
::Input
) { }
30 // @has assoc_types/fn.cmp_input.html
31 // @has - '//*[@class="rust fn"]' 'where T::Input: PartialEq<U::Input>'
32 // @has - '//*[@class="rust fn"]//a[@href="trait.Feed.html#associatedtype.Input"]' 'Input'
33 pub fn cmp_input
<T
: Feed
, U
: Feed
>(a
: &T
::Input
, b
: &U
::Input
) -> bool
34 where T
::Input
: PartialEq
<U
::Input
>