File: reexport-of-reexport-108679.rs

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (30 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// This test ensures that the `struct.B.html` only exists in `a`:
// since `a::B` is public (and inlined too), `self::a::B` doesn't
// need to be inlined as well.

#![crate_name = "foo"]

pub mod a {
    //@ has 'foo/a/index.html'
    // Should only contain "Structs".
    //@ count - '//*[@id="main-content"]//*[@class="item-table"]' 1
    //@ has - '//*[@id="structs"]' 'Structs'
    //@ has - '//*[@id="main-content"]//a[@href="struct.A.html"]' 'A'
    //@ has - '//*[@id="main-content"]//a[@href="struct.B.html"]' 'B'
    mod b {
        pub struct B;
    }
    pub use self::b::B;
    pub struct A;
}

//@ has 'foo/index.html'
//@ !has - '//*[@id="structs"]' 'Structs'
//@ has - '//*[@id="reexports"]' 'Re-exports'
//@ has - '//*[@id="modules"]' 'Modules'
//@ has - '//*[@id="main-content"]//*[@id="reexport.A"]' 'pub use self::a::A;'
//@ has - '//*[@id="main-content"]//*[@id="reexport.B"]' 'pub use self::a::B;'
// Should only contain "Modules" and "Re-exports".
//@ count - '//*[@id="main-content"]//*[@class="item-table"]' 1
//@ count - '//*[@id="main-content"]//*[@class="item-table reexports"]' 1
pub use self::a::{A, B};