|
8 | 8 | // option. This file may not be copied, modified, or distributed
|
9 | 9 | // except according to those terms.
|
10 | 10 |
|
| 11 | +/// Docs associated with the trait definition. |
11 | 12 | pub trait T {
|
| 13 | + /// Docs associated with the trait a_method definition. |
12 | 14 | fn a_method(&self) -> usize;
|
| 15 | + |
| 16 | + /// Docs associated with the trait b_method definition. |
| 17 | + fn b_method(&self) -> usize { |
| 18 | + self.a_method() |
| 19 | + } |
| 20 | +} |
| 21 | + |
| 22 | +// @has manual_impl/struct.S1.html '//*[@class="trait"]' 'T' |
| 23 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S1 trait implementation.' |
| 24 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S1 trait a_method implementation.' |
| 25 | +// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.' |
| 26 | +// @!has - '//*[@class="docblock"]' 'Docs associated with the trait b_method definition.' |
| 27 | +pub struct S1(usize); |
| 28 | + |
| 29 | +/// Docs associated with the S1 trait implementation. |
| 30 | +impl T for S1 { |
| 31 | + /// Docs associated with the S1 trait a_method implementation. |
| 32 | + fn a_method(&self) -> usize { |
| 33 | + self.0 |
| 34 | + } |
| 35 | +} |
| 36 | + |
| 37 | +// @has manual_impl/struct.S2.html '//*[@class="trait"]' 'T' |
| 38 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait implementation.' |
| 39 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait a_method implementation.' |
| 40 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait b_method implementation.' |
| 41 | +// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.' |
| 42 | +// @!has - '//*[@class="docblock"]' 'Docs associated with the trait b_method definition.' |
| 43 | +pub struct S2(usize); |
| 44 | + |
| 45 | +/// Docs associated with the S2 trait implementation. |
| 46 | +impl T for S2 { |
| 47 | + /// Docs associated with the S2 trait a_method implementation. |
| 48 | + fn a_method(&self) -> usize { |
| 49 | + self.0 |
| 50 | + } |
| 51 | + |
| 52 | + /// Docs associated with the S2 trait b_method implementation. |
| 53 | + fn b_method(&self) -> usize { |
| 54 | + 5 |
| 55 | + } |
13 | 56 | }
|
14 | 57 |
|
15 |
| -// @has manual_impl/struct.S.html '//*[@class="trait"]' 'T' |
16 |
| -// @has - '//*[@class="docblock"]' 'Docs associated with the trait implementation.' |
17 |
| -// @has - '//*[@class="docblock"]' 'Docs associated with the trait method implementation.' |
18 |
| -pub struct S(usize); |
| 58 | +// @has manual_impl/struct.S3.html '//*[@class="trait"]' 'T' |
| 59 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S3 trait implementation.' |
| 60 | +// @has - '//*[@class="docblock"]' 'Docs associated with the S3 trait b_method implementation.' |
| 61 | +// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.' |
| 62 | +pub struct S3(usize); |
19 | 63 |
|
20 |
| -/// Docs associated with the trait implementation. |
21 |
| -impl T for S { |
22 |
| - /// Docs associated with the trait method implementation. |
| 64 | +/// Docs associated with the S3 trait implementation. |
| 65 | +impl T for S3 { |
23 | 66 | fn a_method(&self) -> usize {
|
24 | 67 | self.0
|
25 | 68 | }
|
| 69 | + |
| 70 | + /// Docs associated with the S3 trait b_method implementation. |
| 71 | + fn b_method(&self) -> usize { |
| 72 | + 5 |
| 73 | + } |
26 | 74 | }
|
0 commit comments