@@ -403,13 +403,6 @@ pub use alloc_crate::string;
403403pub use alloc_crate:: vec;
404404#[ stable( feature = "rust1" , since = "1.0.0" ) ]
405405pub use core:: any;
406- #[ stable( feature = "simd_arch" , since = "1.27.0" ) ]
407- // The `no_inline`-attribute is required to make the documentation of all
408- // targets available.
409- // See https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549 for
410- // more information.
411- #[ doc( no_inline) ] // Note (#82861): required for correct documentation
412- pub use core:: arch;
413406#[ stable( feature = "core_array" , since = "1.36.0" ) ]
414407pub use core:: array;
415408#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -527,6 +520,31 @@ pub mod task {
527520 pub use alloc:: task:: * ;
528521}
529522
523+ #[ doc = include_str ! ( "../../stdarch/crates/core_arch/src/core_arch_docs.md" ) ]
524+ #[ stable( feature = "simd_arch" , since = "1.27.0" ) ]
525+ pub mod arch {
526+ #[ stable( feature = "simd_arch" , since = "1.27.0" ) ]
527+ // The `no_inline`-attribute is required to make the documentation of all
528+ // targets available.
529+ // See https://github.com/rust-lang/rust/pull/57808#issuecomment-457390549 for
530+ // more information.
531+ #[ doc( no_inline) ] // Note (#82861): required for correct documentation
532+ pub use core:: arch:: * ;
533+
534+ #[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
535+ pub use std_detect:: is_x86_feature_detected;
536+ #[ unstable( feature = "stdsimd" , issue = "48556" ) ]
537+ pub use std_detect:: {
538+ is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
539+ is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
540+ is_riscv_feature_detected,
541+ } ;
542+ }
543+
544+ // This was stabilized in the crate root so we have to keep it there.
545+ #[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
546+ pub use std_detect:: is_x86_feature_detected;
547+
530548// The runtime entry point and a few unstable public functions used by the
531549// compiler
532550#[ macro_use]
@@ -545,18 +563,6 @@ mod panicking;
545563#[ allow( dead_code, unused_attributes) ]
546564mod backtrace_rs;
547565
548- #[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
549- pub use std_detect:: is_x86_feature_detected;
550- #[ doc( hidden) ]
551- #[ unstable( feature = "stdsimd" , issue = "48556" ) ]
552- pub use std_detect:: * ;
553- #[ unstable( feature = "stdsimd" , issue = "48556" ) ]
554- pub use std_detect:: {
555- is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
556- is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
557- is_riscv_feature_detected,
558- } ;
559-
560566// Re-export macros defined in libcore.
561567#[ stable( feature = "rust1" , since = "1.0.0" ) ]
562568#[ allow( deprecated, deprecated_in_future) ]
0 commit comments