File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
tests/rustdoc/inline_local Expand file tree Collapse file tree 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<'_, '_> {
3939 let item_stability = self . cx . tcx . lookup_stability ( def_id) ;
4040 let inline_stability =
4141 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+ } ) ;
4252 let own_stability = if let Some ( item_stab) = item_stability
4353 && let StabilityLevel :: Stable { since : _, allowed_through_unstable_modules } =
4454 item_stab. level
@@ -47,6 +57,8 @@ impl DocFolder for StabilityPropagator<'_, '_> {
4757 since : inline_since,
4858 allowed_through_unstable_modules : _,
4959 } = inline_stab. level
60+ && let Some ( is_global_export) = is_glob_export
61+ && !is_global_export
5062 {
5163 inline_stab. level = StabilityLevel :: Stable {
5264 since : inline_since,
Original file line number Diff line number Diff line change @@ -16,3 +16,31 @@ pub mod ffi {
1616//@ has "foo/struct.CStr.html" "//span[@class='sub-heading']/span[@class='since']" "1.0.0"
1717//@ !has - "//span[@class='sub-heading']/span[@class='since']" "1.99.0"
1818pub 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