Skip to content

Commit e2a77b3

Browse files
author
Tor Hovland
committed
Test Deprecated, Portability, and Unstable.
1 parent fca088a commit e2a77b3

File tree

2 files changed

+76
-3
lines changed

2 files changed

+76
-3
lines changed

src/test/rustdoc/issue-83832.rs renamed to src/test/rustdoc/reexport-stability-tags-deprecated-and-portability.rs

+15-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ pub mod tag {
88
#[doc(cfg(feature = "sync"))]
99
pub trait Portability {}
1010

11-
pub trait Unstable {}
11+
#[deprecated(since = "0.1.8", note = "Use bar() instead")]
12+
#[doc(cfg(feature = "sync"))]
13+
pub trait Both {}
14+
15+
pub trait None {}
1216
}
1317

1418
// @has foo/mod1/index.html
@@ -29,8 +33,16 @@ pub mod mod2 {
2933

3034
// @has foo/mod3/index.html
3135
pub mod mod3 {
32-
// @has - '//code' 'pub use tag::Unstable;'
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;'
3345
// @!has - '//span' 'Deprecated'
3446
// @!has - '//span' 'sync'
35-
pub use tag::Unstable;
47+
pub use tag::None;
3648
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#![crate_name = "foo"]
2+
#![feature(doc_cfg)]
3+
#![feature(staged_api)]
4+
#![stable(feature = "rust1", since = "1.0.0")]
5+
6+
#[stable(feature = "rust1", since = "1.0.0")]
7+
pub mod tag {
8+
#[unstable(feature = "humans", issue = "none")]
9+
pub trait Unstable {}
10+
11+
#[stable(feature = "rust1", since = "1.0.0")]
12+
#[doc(cfg(feature = "sync"))]
13+
pub trait Portability {}
14+
15+
#[unstable(feature = "humans", issue = "none")]
16+
#[doc(cfg(feature = "sync"))]
17+
pub trait Both {}
18+
19+
#[stable(feature = "rust1", since = "1.0.0")]
20+
pub trait None {}
21+
}
22+
23+
// @has foo/mod1/index.html
24+
#[stable(feature = "rust1", since = "1.0.0")]
25+
pub mod mod1 {
26+
// @has - '//code' 'pub use tag::Unstable;'
27+
// @has - '//span' 'Experimental'
28+
// @!has - '//span' 'sync'
29+
#[stable(feature = "rust1", since = "1.0.0")]
30+
pub use tag::Unstable;
31+
}
32+
33+
// @has foo/mod2/index.html
34+
#[stable(feature = "rust1", since = "1.0.0")]
35+
pub mod mod2 {
36+
// @has - '//code' 'pub use tag::Portability;'
37+
// @!has - '//span' 'Experimental'
38+
// @has - '//span' 'sync'
39+
#[stable(feature = "rust1", since = "1.0.0")]
40+
pub use tag::Portability;
41+
}
42+
43+
// @has foo/mod3/index.html
44+
#[stable(feature = "rust1", since = "1.0.0")]
45+
pub mod mod3 {
46+
// @has - '//code' 'pub use tag::Both;'
47+
// @has - '//span' 'Experimental'
48+
// @has - '//span' 'sync'
49+
#[stable(feature = "rust1", since = "1.0.0")]
50+
pub use tag::Both;
51+
}
52+
53+
// @has foo/mod4/index.html
54+
#[stable(feature = "rust1", since = "1.0.0")]
55+
pub mod mod4 {
56+
// @has - '//code' 'pub use tag::None;'
57+
// @!has - '//span' 'Experimental'
58+
// @!has - '//span' 'sync'
59+
#[stable(feature = "rust1", since = "1.0.0")]
60+
pub use tag::None;
61+
}

0 commit comments

Comments
 (0)