]>
Commit | Line | Data |
---|---|---|
c295e0f8 XL |
1 | // compile-flags: -Z unstable-options --document-hidden-items |
2 | ||
3 | // test for trait methods with `doc(hidden)` with `--document-hidden-items` passed. | |
4 | #![crate_name = "foo"] | |
5 | ||
6 | // @has foo/trait.Trait.html | |
7 | // @has - '//*[@id="associatedtype.Foo"]' 'type Foo' | |
8 | // @has - '//*[@id="associatedtype.Bar"]' 'type Bar' | |
9 | // @has - '//*[@id="tymethod.f"]' 'fn f()' | |
10 | // @has - '//*[@id="tymethod.g"]' 'fn g()' | |
11 | pub trait Trait { | |
12 | #[doc(hidden)] | |
13 | type Foo; | |
14 | type Bar; | |
15 | #[doc(hidden)] | |
16 | fn f(); | |
17 | fn g(); | |
18 | } | |
19 | ||
20 | // @has foo/struct.S.html | |
21 | // @has - '//*[@id="associatedtype.Foo"]' 'type Foo' | |
22 | // @has - '//*[@id="associatedtype.Bar"]' 'type Bar' | |
23 | // @has - '//*[@id="method.f"]' 'fn f()' | |
24 | // @has - '//*[@id="method.g"]' 'fn g()' | |
25 | pub struct S; | |
26 | impl Trait for S { | |
27 | type Foo = (); | |
28 | type Bar = (); | |
29 | fn f() {} | |
30 | fn g() {} | |
31 | } |