]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/pub-method.rs
incremental: migrate diagnostics
[rust.git] / tests / rustdoc / pub-method.rs
1 // compile-flags: --document-private-items
2
3 #![crate_name = "foo"]
4
5 // @has foo/fn.bar.html
6 // @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'pub fn bar() -> '
7 /// foo
8 pub fn bar() -> usize {
9     2
10 }
11
12 // @has foo/struct.Foo.html
13 // @has - '//*[@class="method"]' 'pub fn new()'
14 // @has - '//*[@class="method"]' 'fn not_pub()'
15 pub struct Foo(usize);
16
17 impl Foo {
18     pub fn new() -> Foo { Foo(0) }
19     fn not_pub() {}
20 }