Skip to content

Commit 1bfcfc6

Browse files
committed
refactor: move attribute and keywords docs files to core
1 parent 4429659 commit 1bfcfc6

4 files changed

Lines changed: 24 additions & 8 deletions

File tree

library/core/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,4 +397,19 @@ pub mod simd {
397397
pub use crate::core_simd::simd::*;
398398
}
399399

400+
// Include private modules that exist solely to provide rustdoc
401+
// documentation for built-in attributes. Using `include!` because rustdoc
402+
// only looks for these modules at the crate level.
403+
include!("attribute_docs.rs");
404+
405+
// Include a number of private modules that exist solely to provide
406+
// the rustdoc documentation for the existing keywords. Using `include!`
407+
// because rustdoc only looks for these modules at the crate level.
408+
include!("keyword_docs.rs");
409+
410+
// Include a number of private modules that exist solely to provide
411+
// the rustdoc documentation for primitive types. Using `include!`
412+
// because rustdoc only looks for these modules at the crate level.
400413
include!("primitive_docs.rs");
414+
415+

library/std/src/lib.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -777,20 +777,21 @@ pub mod from {
777777
pub use core::from::From;
778778
}
779779

780+
// Include private modules that exist solely to provide rustdoc
781+
// documentation for built-in attributes. Using `include!` because rustdoc
782+
// only looks for these modules at the crate level.
783+
include!("../../core/src/attribute_docs.rs");
784+
780785
// Include a number of private modules that exist solely to provide
781-
// the rustdoc documentation for primitive types. Using `include!`
786+
// the rustdoc documentation for the existing keywords. Using `include!`
782787
// because rustdoc only looks for these modules at the crate level.
783-
include!("../../core/src/primitive_docs.rs");
788+
include!("../../core/src/keyword_docs.rs");
784789

785790
// Include a number of private modules that exist solely to provide
786-
// the rustdoc documentation for the existing keywords. Using `include!`
791+
// the rustdoc documentation for primitive types. Using `include!`
787792
// because rustdoc only looks for these modules at the crate level.
788-
include!("keyword_docs.rs");
793+
include!("../../core/src/primitive_docs.rs");
789794

790-
// Include private modules that exist solely to provide rustdoc
791-
// documentation for built-in attributes. Using `include!` because rustdoc
792-
// only looks for these modules at the crate level.
793-
include!("attribute_docs.rs");
794795

795796
// This is required to avoid an unstable error when `restricted-std` is not
796797
// enabled. The use of #![feature(restricted_std)] in rustc-std-workspace-std

0 commit comments

Comments
 (0)