File: pub-reexport-of-pub-reexport-46506.rs

package info (click to toggle)
rustc 1.89.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 906,624 kB
  • sloc: xml: 158,148; python: 34,888; javascript: 19,595; sh: 19,221; ansic: 13,046; cpp: 7,144; asm: 4,376; makefile: 692; lisp: 174; sql: 15
file content (24 lines) | stat: -rw-r--r-- 957 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// This is a regression test for <https://github.com/rust-lang/rust/issues/46506>.
// This test ensures that if public re-exported is re-exported, it won't be inlined.

#![crate_name = "foo"]

//@ has 'foo/associations/index.html'
//@ count - '//*[@id="main-content"]/*[@class="section-header"]' 1
//@ has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
//@ has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
//@ has 'foo/associations/trait.GroupedBy.html'
pub mod associations {
    mod belongs_to {
        pub trait GroupedBy {}
    }
    pub use self::belongs_to::GroupedBy;
}

//@ has 'foo/prelude/index.html'
//@ count - '//*[@id="main-content"]/*[@class="section-header"]' 1
//@ has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
//@ has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
pub mod prelude {
    pub use associations::GroupedBy;
}