]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/manual_impl.rs
Update unsuspicious file list
[rustc.git] / src / test / rustdoc / manual_impl.rs
CommitLineData
a7813a04
XL
1// @has manual_impl/trait.T.html
2// @has - '//*[@class="docblock"]' 'Docs associated with the trait definition.'
3// @has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
4// @has - '//*[@class="docblock"]' 'Docs associated with the trait b_method definition.'
5/// Docs associated with the trait definition.
6pub trait T {
7 /// Docs associated with the trait a_method definition.
8 fn a_method(&self) -> usize;
9
10 /// Docs associated with the trait b_method definition.
11 fn b_method(&self) -> usize {
12 self.a_method()
13 }
14
15 /// Docs associated with the trait c_method definition.
16 ///
17 /// There is another line
18 fn c_method(&self) -> usize {
19 self.a_method()
20 }
21}
22
23// @has manual_impl/struct.S1.html '//*[@class="trait"]' 'T'
24// @has - '//*[@class="docblock"]' 'Docs associated with the S1 trait implementation.'
25// @has - '//*[@class="docblock"]' 'Docs associated with the S1 trait a_method implementation.'
26// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
17df50a5
XL
27// @has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Docs associated with the trait b_method definition.'
28// @has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Docs associated with the trait c_method definition.'
a7813a04 29// @!has - '//*[@class="docblock"]' 'There is another line'
17df50a5 30// @has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Read more'
a7813a04
XL
31pub struct S1(usize);
32
33/// Docs associated with the S1 trait implementation.
34impl T for S1 {
35 /// Docs associated with the S1 trait a_method implementation.
36 fn a_method(&self) -> usize {
37 self.0
38 }
39}
40
41// @has manual_impl/struct.S2.html '//*[@class="trait"]' 'T'
42// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait implementation.'
43// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait a_method implementation.'
44// @has - '//*[@class="docblock"]' 'Docs associated with the S2 trait c_method implementation.'
17df50a5 45// @has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Docs associated with the trait b_method definition.'
a7813a04
XL
46pub struct S2(usize);
47
48/// Docs associated with the S2 trait implementation.
49impl T for S2 {
50 /// Docs associated with the S2 trait a_method implementation.
51 fn a_method(&self) -> usize {
52 self.0
53 }
54
55 /// Docs associated with the S2 trait c_method implementation.
56 fn c_method(&self) -> usize {
57 5
58 }
59}
60
61// @has manual_impl/struct.S3.html '//*[@class="trait"]' 'T'
17df50a5
XL
62// @has - '//div[@class="docblock"]' 'Docs associated with the S3 trait implementation.'
63// @has - '//div[@class="docblock"]' 'Docs associated with the S3 trait b_method implementation.'
64// @has - '//div[@class="impl-items"]//div[@class="docblock"]' 'Docs associated with the trait a_method definition.'
a7813a04
XL
65pub struct S3(usize);
66
67/// Docs associated with the S3 trait implementation.
68impl T for S3 {
69 fn a_method(&self) -> usize {
70 self.0
71 }
72
73 /// Docs associated with the S3 trait b_method implementation.
74 fn b_method(&self) -> usize {
75 5
76 }
77}