File tree 2 files changed +40
-0
lines changed
tests/rustdoc/inline_local
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ impl DocFolder for StabilityPropagator<'_, '_> {
39
39
let item_stability = self . cx . tcx . lookup_stability ( def_id) ;
40
40
let inline_stability =
41
41
item. inline_stmt_id . and_then ( |did| self . cx . tcx . lookup_stability ( did) ) ;
42
+ let is_glob_export = item. inline_stmt_id . and_then ( |id| {
43
+ let hir_id = self . cx . tcx . local_def_id_to_hir_id ( id) ;
44
+ Some ( matches ! (
45
+ self . cx. tcx. hir_node( hir_id) ,
46
+ rustc_hir:: Node :: Item ( rustc_hir:: Item {
47
+ kind: rustc_hir:: ItemKind :: Use ( _, rustc_hir:: UseKind :: Glob ) ,
48
+ ..
49
+ } )
50
+ ) )
51
+ } ) ;
42
52
let own_stability = if let Some ( item_stab) = item_stability
43
53
&& let StabilityLevel :: Stable { since : _, allowed_through_unstable_modules } =
44
54
item_stab. level
@@ -47,6 +57,8 @@ impl DocFolder for StabilityPropagator<'_, '_> {
47
57
since : inline_since,
48
58
allowed_through_unstable_modules : _,
49
59
} = inline_stab. level
60
+ && let Some ( is_global_export) = is_glob_export
61
+ && !is_global_export
50
62
{
51
63
inline_stab. level = StabilityLevel :: Stable {
52
64
since : inline_since,
Original file line number Diff line number Diff line change @@ -16,3 +16,31 @@ pub mod ffi {
16
16
//@ has "foo/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0"
17
17
//@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.99.0"
18
18
pub use ffi:: CStr ;
19
+
20
+ // https://github.com/rust-lang/rust/issues/137141
21
+ #[ stable( feature = "futures_api" , since = "1.36.0" ) ]
22
+ //@ has "foo/task/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.36.0"
23
+ //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.0.0"
24
+ pub mod task {
25
+
26
+ #[ doc( inline) ]
27
+ #[ stable( feature = "futures_api" , since = "1.36.0" ) ]
28
+ //@ has "foo/task/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.36.0"
29
+ //@ has "foo/task/ready/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.64.0"
30
+ pub use core:: task:: * ;
31
+ }
32
+
33
+ #[ stable( feature = "futures_api" , since = "1.36.0" ) ]
34
+ //@ has "foo/core/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.36.0"
35
+ //@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.0.0"
36
+ pub mod core {
37
+ #[ stable( feature = "futures_api" , since = "1.36.0" ) ]
38
+ //@ has "foo/core/task/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.36.0"
39
+ pub mod task {
40
+
41
+ #[ stable( feature = "ready_macro" , since = "1.64.0" ) ]
42
+ //@ has "foo/core/task/ready/index.html" "//span[@class='sub-heading']/span[@class='since']" "1.64.0"
43
+ pub mod ready {
44
+ }
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments