File: fully-stable-path-is-better.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 (40 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (11)
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
//! Test case for [134702]
//!
//! [134702]: https://github.com/rust-lang/rust/issues/134702
#![crate_name = "foo"]
#![stable(since = "1.0", feature = "v1")]

#![feature(staged_api, rustc_attrs)]

#[stable(since = "1.0", feature = "stb1")]
pub mod stb1 {
    #[doc(inline)]
    #[stable(since = "1.0", feature = "stb1")]
    pub use crate::uns::Inside1;
}

#[unstable(feature = "uns", issue = "135003")]
pub mod uns {
    #[stable(since = "1.0", feature = "stb1")]
    #[rustc_allowed_through_unstable_modules = "use stable path instead"]
    pub struct Inside1;
    #[stable(since = "1.0", feature = "stb2")]
    #[rustc_allowed_through_unstable_modules = "use stable path instead"]
    pub struct Inside2;
}

#[stable(since = "1.0", feature = "stb2")]
pub mod stb2 {
    #[doc(inline)]
    #[stable(since = "1.0", feature = "stb2")]
    pub use crate::uns::Inside2;
}

#[stable(since = "1.0", feature = "nested")]
pub mod nested {
    //! [Inside1] [Inside2]
    //@ has foo/nested/index.html '//a[@href="../stb1/struct.Inside1.html"]' 'Inside1'
    //@ has foo/nested/index.html '//a[@href="../stb2/struct.Inside2.html"]' 'Inside2'
    use crate::stb1::Inside1;
    use crate::stb2::Inside2;
}