Skip to content

Commit e19bc6e

Browse files
committed
move core::arch into separate file
1 parent 2ed65da commit e19bc6e

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

library/core/src/arch.rs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#![doc = include_str!("../../stdarch/crates/core_arch/src/core_arch_docs.md")]
2+
3+
#[stable(feature = "simd_arch", since = "1.27.0")]
4+
pub use crate::core_arch::arch::*;
5+
6+
/// Inline assembly.
7+
///
8+
/// Refer to [rust by example] for a usage guide and the [reference] for
9+
/// detailed information about the syntax and available options.
10+
///
11+
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
12+
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
13+
#[stable(feature = "asm", since = "1.59.0")]
14+
#[rustc_builtin_macro]
15+
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
16+
/* compiler built-in */
17+
}
18+
19+
/// Module-level inline assembly.
20+
///
21+
/// Refer to [rust by example] for a usage guide and the [reference] for
22+
/// detailed information about the syntax and available options.
23+
///
24+
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
25+
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
26+
#[stable(feature = "global_asm", since = "1.59.0")]
27+
#[rustc_builtin_macro]
28+
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
29+
/* compiler built-in */
30+
}

library/core/src/lib.rs

+1-31
Original file line numberDiff line numberDiff line change
@@ -392,38 +392,8 @@ pub mod primitive;
392392
#[unstable(feature = "stdsimd", issue = "48556")]
393393
mod core_arch;
394394

395-
#[doc = include_str!("../../stdarch/crates/core_arch/src/core_arch_docs.md")]
396395
#[stable(feature = "simd_arch", since = "1.27.0")]
397-
pub mod arch {
398-
#[stable(feature = "simd_arch", since = "1.27.0")]
399-
pub use crate::core_arch::arch::*;
400-
401-
/// Inline assembly.
402-
///
403-
/// Refer to [rust by example] for a usage guide and the [reference] for
404-
/// detailed information about the syntax and available options.
405-
///
406-
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
407-
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
408-
#[stable(feature = "asm", since = "1.59.0")]
409-
#[rustc_builtin_macro]
410-
pub macro asm("assembly template", $(operands,)* $(options($(option),*))?) {
411-
/* compiler built-in */
412-
}
413-
414-
/// Module-level inline assembly.
415-
///
416-
/// Refer to [rust by example] for a usage guide and the [reference] for
417-
/// detailed information about the syntax and available options.
418-
///
419-
/// [rust by example]: https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html
420-
/// [reference]: https://doc.rust-lang.org/nightly/reference/inline-assembly.html
421-
#[stable(feature = "global_asm", since = "1.59.0")]
422-
#[rustc_builtin_macro]
423-
pub macro global_asm("assembly template", $(operands,)* $(options($(option),*))?) {
424-
/* compiler built-in */
425-
}
426-
}
396+
pub mod arch;
427397

428398
// Pull in the `core_simd` crate directly into libcore. The contents of
429399
// `core_simd` are in a different repository: rust-lang/portable-simd.

0 commit comments

Comments
 (0)