]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/pub-method.rs
Rollup merge of #56044 - matthewjasper:function-param-drop-order, r=cramertj
[rust.git] / src / test / rustdoc / pub-method.rs
1 // ignore-tidy-linelength
2 // compile-flags: --document-private-items
3
4 #![crate_name = "foo"]
5
6 // @has foo/fn.bar.html
7 // @has - '//*[@class="rust fn"]' 'pub fn bar() -> '
8 /// foo
9 pub fn bar() -> usize {
10     2
11 }
12
13 // @has foo/struct.Foo.html
14 // @has - '//*[@class="method"]' 'pub fn new()'
15 // @has - '//*[@class="method"]' 'fn not_pub()'
16 pub struct Foo(usize);
17
18 impl Foo {
19     pub fn new() -> Foo { Foo(0) }
20     fn not_pub() {}
21 }