File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ // This test ensures that if a private re-export is present in a public API, it'll be
2+ // replaced by the first public item in the re-export chain or by the private item.
3+
4+ #![ crate_name = "foo" ]
5+
6+ use crate :: bar:: Bar as Alias ;
7+
8+ pub use crate :: bar:: Bar as Whatever ;
9+ use crate :: Whatever as Whatever2 ;
10+ use crate :: Whatever2 as Whatever3 ;
11+ pub use crate :: bar:: Inner as Whatever4 ;
12+
13+ mod bar {
14+ pub struct Bar ;
15+ pub use self :: Bar as Inner ;
16+ }
17+
18+ // @has 'foo/fn.bar.html'
19+ // @has - '//*[@class="rust item-decl"]/code' 'pub fn bar() -> Bar'
20+ pub fn bar ( ) -> Alias {
21+ Alias
22+ }
23+
24+ // @has 'foo/fn.bar2.html'
25+ // @has - '//*[@class="rust item-decl"]/code' 'pub fn bar2() -> Whatever'
26+ pub fn bar2 ( ) -> Whatever3 {
27+ Whatever
28+ }
29+
30+ // @has 'foo/fn.bar3.html'
31+ // @has - '//*[@class="rust item-decl"]/code' 'pub fn bar3() -> Whatever4'
32+ pub fn bar3 ( ) -> Whatever4 {
33+ Whatever
34+ }
You can’t perform that action at this time.
0 commit comments