Closed
Description
compiler_builtins exports some macros for use by its tests, but rustc seems to make these available to any code as if they were part of the prelude. While compiler_builtins should be fixed to not export these, it is also strange that the prelude includes these macros.
// Compile with: rustc foo.rs --target aarch64-unknown-linux-gnu --crate-type lib
#![no_std]
foreach_cas16!();
error: unexpected end of macro invocation
--> src/lib.rs:3:1
|
3 | foreach_cas16!();
| ^^^^^^^^^^^^^^^^ missing tokens in macro arguments
|
note: while trying to match meta-variable `$r#macro:path`
--> /home/amanieu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/obj/build/x86_64-unknown-linux-gnu/stage1-std/aarch64-unknown-linux-gnu/release/build/compiler_builtins-0862f16702efa101/out/outlined_atomics.rs:103:51
error: aborting due to previous error