Skip to content

Commit b3d4916

Browse files
authored
Rollup merge of #104634 - RalfJung:core-arch, r=Mark-Simulacrum
move core::arch into separate file This works around #104633 which otherwise leads to warnings in miri-test-libstd.
2 parents ff72187 + e19bc6e commit b3d4916

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
@@ -394,38 +394,8 @@ pub mod primitive;
394394
#[unstable(feature = "stdsimd", issue = "48556")]
395395
mod core_arch;
396396

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

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

0 commit comments

Comments
 (0)