]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/hidden-trait-methods-with-document-hidden-items.rs
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / rustdoc / hidden-trait-methods-with-document-hidden-items.rs
CommitLineData
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()'
11pub 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()'
25pub struct S;
26impl Trait for S {
27 type Foo = ();
28 type Bar = ();
29 fn f() {}
30 fn g() {}
31}