Skip to content

Commit 2ab1bfd

Browse files
committed
---
yaml --- r: 275373 b: refs/heads/master c: d95ca28 h: refs/heads/master i: 275371: 1c76b2a
1 parent dd1f1d6 commit 2ab1bfd

File tree

2 files changed

+56
-8
lines changed

2 files changed

+56
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d8d8669439bd9e636b9209733c24c32063cc611d
2+
refs/heads/master: d95ca2822cdc67ddec96d16533e23a10d6bfd136
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
44
refs/heads/try: 49312a405e14a449b98fe0056b12a40ac128be4a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/test/rustdoc/manual_impl.rs

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,67 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
/// Docs associated with the trait definition.
1112
pub trait T {
13+
/// Docs associated with the trait a_method definition.
1214
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+
}
1356
}
1457

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);
1963

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 {
2366
fn a_method(&self) -> usize {
2467
self.0
2568
}
69+
70+
/// Docs associated with the S3 trait b_method implementation.
71+
fn b_method(&self) -> usize {
72+
5
73+
}
2674
}

0 commit comments

Comments
 (0)