diff options
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/Cargo.toml | 3 | ||||
| -rw-r--r-- | src/libcore/lib.rs | 12 | ||||
| -rw-r--r-- | src/libcore/prelude/v1.rs | 2 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/libcore/Cargo.toml b/src/libcore/Cargo.toml index ac07ffb14fe..65f7a42824b 100644 --- a/src/libcore/Cargo.toml +++ b/src/libcore/Cargo.toml @@ -20,6 +20,9 @@ path = "../libcore/tests/lib.rs" name = "corebenches" path = "../libcore/benches/lib.rs" +[dependencies] +matches_macro = { path = "../libmatches_macro" } + [dev-dependencies] rand = "0.7" diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 30e8dddff85..a5af32250e6 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -85,6 +85,7 @@ #![feature(iter_once_with)] #![feature(lang_items)] #![feature(link_llvm_intrinsics)] +#![feature(matches_macro)] #![feature(never_type)] #![feature(nll)] #![feature(exhaustive_patterns)] @@ -134,7 +135,16 @@ use prelude::v1::*; #[macro_use] -mod macros; +#[path = "macros.rs"] +mod prelude_macros; + +/// Macros that are not in the prelude and need to be imported explicitly +#[unstable(feature = "matches_macro", issue = "0")] +pub mod macros { + #[unstable(feature = "matches_macro", issue = "0")] + #[doc(inline)] + pub use matches_macro::matches; +} #[macro_use] mod internal_macros; diff --git a/src/libcore/prelude/v1.rs b/src/libcore/prelude/v1.rs index 7cc279a9ef2..285f8d6e077 100644 --- a/src/libcore/prelude/v1.rs +++ b/src/libcore/prelude/v1.rs @@ -82,7 +82,7 @@ pub use crate::{ #[stable(feature = "builtin_macro_prelude", since = "1.38.0")] #[allow(deprecated)] #[doc(no_inline)] -pub use crate::macros::builtin::{ +pub use crate::prelude_macros::builtin::{ RustcDecodable, RustcEncodable, bench, |
