]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/issue-20727-4.rs
Rollup merge of #107580 - lenko-d:default_value_for_a_lifetime_generic_parameter_prod...
[rust.git] / tests / rustdoc / issue-20727-4.rs
1 // aux-build:issue-20727.rs
2 // ignore-cross-compile
3
4 extern crate issue_20727;
5
6 // @has issue_20727_4/trait.Index.html
7 pub trait Index<Idx: ?Sized> {
8     // @has - '//pre[@class="rust item-decl"]' 'trait Index<Idx: ?Sized> {'
9     // @has - '//pre[@class="rust item-decl"]' 'type Output: ?Sized'
10     type Output: ?Sized;
11
12     // @has - '//pre[@class="rust item-decl"]' \
13     //        'fn index(&self, index: Idx) -> &Self::Output'
14     fn index(&self, index: Idx) -> &Self::Output;
15 }
16
17 // @has issue_20727_4/trait.IndexMut.html
18 pub trait IndexMut<Idx: ?Sized>: Index<Idx> {
19     // @has - '//pre[@class="rust item-decl"]' \
20     //        'trait IndexMut<Idx: ?Sized>: Index<Idx> {'
21     // @has - '//pre[@class="rust item-decl"]' \
22     //        'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;'
23     fn index_mut(&mut self, index: Idx) -> &mut Self::Output;
24 }
25
26 pub mod reexport {
27     // @has issue_20727_4/reexport/trait.Index.html
28     // @has - '//pre[@class="rust item-decl"]' 'trait Index<Idx>where Idx: ?Sized,{'
29     // @has - '//pre[@class="rust item-decl"]' 'type Output: ?Sized'
30     // @has - '//pre[@class="rust item-decl"]' \
31     //        'fn index(&self, index: Idx) -> &Self::Output'
32     pub use issue_20727::Index;
33
34     // @has issue_20727_4/reexport/trait.IndexMut.html
35     // @has - '//pre[@class="rust item-decl"]' \
36     //        'trait IndexMut<Idx>: Index<Idx>where Idx: ?Sized,{'
37     // @has - '//pre[@class="rust item-decl"]' \
38     //        'fn index_mut(&mut self, index: Idx) -> &mut Self::Output;'
39     pub use issue_20727::IndexMut;
40 }