Unnamed repository; edit this file 'description' to name the repository.
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
use super::*;

#[test]
fn kw_path_renames() {
    check(
        r#"
macro_rules! m {
    () => {
        pub use $crate as dollar_crate;
        pub use $crate::{self as self_dollar_crate};
    };
}

pub use self as this;
pub use crate as krate;

pub use crate::{self as self_krate};
m!();

mod foo {
    pub use super as zuper;
    pub use super::{self as self_zuper};
}
"#,
        expect![[r#"
            crate
            - dollar_crate : type (import)
            - foo : type
            - krate : type (import)
            - self_dollar_crate : type (import)
            - self_krate : type (import)
            - this : type (import)
            - (legacy) m : macro!

            crate::foo
            - self_zuper : type (import)
            - zuper : type (import)
            - (legacy) m : macro!
        "#]],
    );
}

#[test]
fn primitive_reexport() {
    check(
        r#"
//- /lib.rs
mod foo;
use foo::int;

//- /foo.rs
pub use i32 as int;
"#,
        expect![[r#"
            crate
            - foo : type
            - int : type (import)

            crate::foo
            - int : type (import)
        "#]],
    );
}