]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/search-index.rs
Rollup merge of #69544 - lqd:unrevert-67174, r=Mark-Simulacrum
[rust.git] / src / test / rustdoc / search-index.rs
1 #![crate_name = "rustdoc_test"]
2
3 use std::ops::Deref;
4
5 // @has search-index.js Foo
6 pub use private::Foo;
7
8 mod private {
9     pub struct Foo;
10     impl Foo {
11         pub fn test_method() {} // @has - test_method
12         fn priv_method() {} // @!has - priv_method
13     }
14
15     pub trait PrivateTrait {
16         fn trait_method(&self) {} // @!has - priv_method
17     }
18 }
19
20 pub struct Bar;
21
22 impl Deref for Bar {
23     // @!has search-index.js Target
24     type Target = Bar;
25     fn deref(&self) -> &Bar { self }
26 }