]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
Rollup merge of #106427 - mejrs:translation_errors, r=davidtwco
[rust.git] / tests / rustdoc / reexport-stability-tags-deprecated-and-portability.rs
1 #![crate_name = "foo"]
2 #![feature(doc_cfg)]
3
4 pub mod tag {
5     #[deprecated(since = "0.1.8", note = "Use bar() instead")]
6     pub trait Deprecated {}
7
8     #[doc(cfg(feature = "sync"))]
9     pub trait Portability {}
10
11     #[deprecated(since = "0.1.8", note = "Use bar() instead")]
12     #[doc(cfg(feature = "sync"))]
13     pub trait Both {}
14
15     pub trait None {}
16 }
17
18 // @has foo/mod1/index.html
19 pub mod mod1 {
20     // @has - '//code' 'pub use tag::Deprecated;'
21     // @has - '//span' 'Deprecated'
22     // @!has - '//span' 'sync'
23     pub use tag::Deprecated;
24 }
25
26 // @has foo/mod2/index.html
27 pub mod mod2 {
28     // @has - '//code' 'pub use tag::Portability;'
29     // @!has - '//span' 'Deprecated'
30     // @has - '//span' 'sync'
31     pub use tag::Portability;
32 }
33
34 // @has foo/mod3/index.html
35 pub mod mod3 {
36     // @has - '//code' 'pub use tag::Both;'
37     // @has - '//span' 'Deprecated'
38     // @has - '//span' 'sync'
39     pub use tag::Both;
40 }
41
42 // @has foo/mod4/index.html
43 pub mod mod4 {
44     // @has - '//code' 'pub use tag::None;'
45     // @!has - '//span' 'Deprecated'
46     // @!has - '//span' 'sync'
47     pub use tag::None;
48 }