rollup merge of #20482: kmcallister/macro-reform
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
This commit is contained in:
commit
7975fd9cee
314 changed files with 3452 additions and 1605 deletions
|
@ -117,13 +117,36 @@
|
|||
|
||||
#![reexport_test_harness_main = "test_main"]
|
||||
|
||||
#[cfg(test)] #[phase(plugin, link)] extern crate log;
|
||||
#[cfg(all(test, stage0))]
|
||||
#[phase(plugin, link)]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(all(test, not(stage0)))]
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[phase(plugin, link)]
|
||||
extern crate core;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[macro_use]
|
||||
#[macro_reexport(assert, assert_eq, debug_assert, debug_assert_eq,
|
||||
unreachable, unimplemented, write, writeln)]
|
||||
extern crate core;
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[phase(plugin, link)]
|
||||
extern crate "collections" as core_collections;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[macro_use]
|
||||
#[macro_reexport(vec)]
|
||||
extern crate "collections" as core_collections;
|
||||
|
||||
extern crate "rand" as core_rand;
|
||||
extern crate alloc;
|
||||
extern crate unicode;
|
||||
extern crate core;
|
||||
extern crate "collections" as core_collections;
|
||||
extern crate "rand" as core_rand;
|
||||
extern crate libc;
|
||||
|
||||
// Make std testable by not duplicating lang items. See #2912
|
||||
|
@ -167,7 +190,18 @@ pub use unicode::char;
|
|||
|
||||
/* Exported macros */
|
||||
|
||||
#[cfg(stage0)]
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
pub mod macros_stage0;
|
||||
|
||||
#[cfg(not(stage0))]
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
pub mod macros;
|
||||
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
pub mod bitflags;
|
||||
|
||||
mod rtdeps;
|
||||
|
@ -179,9 +213,20 @@ pub mod prelude;
|
|||
|
||||
/* Primitive types */
|
||||
|
||||
#[path = "num/float_macros.rs"] mod float_macros;
|
||||
#[path = "num/int_macros.rs"] mod int_macros;
|
||||
#[path = "num/uint_macros.rs"] mod uint_macros;
|
||||
#[path = "num/float_macros.rs"]
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
mod float_macros;
|
||||
|
||||
#[path = "num/int_macros.rs"]
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
mod int_macros;
|
||||
|
||||
#[path = "num/uint_macros.rs"]
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
mod uint_macros;
|
||||
|
||||
#[path = "num/int.rs"] pub mod int;
|
||||
#[path = "num/i8.rs"] pub mod i8;
|
||||
|
@ -210,6 +255,10 @@ pub mod num;
|
|||
|
||||
pub mod thread_local; // first for macros
|
||||
|
||||
#[cfg_attr(stage0, macro_escape)]
|
||||
#[cfg_attr(not(stage0), macro_use)]
|
||||
pub mod thread_local;
|
||||
|
||||
pub mod dynamic_lib;
|
||||
pub mod ffi;
|
||||
pub mod fmt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue