diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-16 10:59:30 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-16 10:59:53 +0200 |
| commit | d420d719c4c44c3c6d02b5fafba4f2cf5e837dba (patch) | |
| tree | 5f5586264bf0a019ea09a20f0526337913a00b03 /src/libsyntax/lib.rs | |
| parent | d160a4e4225eb5e310554316cba78efb2cbe6fa2 (diff) | |
| download | rust-d420d719c4c44c3c6d02b5fafba4f2cf5e837dba.tar.gz rust-d420d719c4c44c3c6d02b5fafba4f2cf5e837dba.zip | |
move syntax::ext to new crate syntax_expand
Diffstat (limited to 'src/libsyntax/lib.rs')
| -rw-r--r-- | src/libsyntax/lib.rs | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index fa75f5624f8..a68b7fdf931 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -13,17 +13,12 @@ #![feature(crate_visibility_modifier)] #![feature(label_break_value)] #![feature(nll)] -#![feature(proc_macro_diagnostic)] -#![feature(proc_macro_internals)] -#![feature(proc_macro_span)] #![feature(try_trait)] #![feature(slice_patterns)] #![feature(unicode_internals)] #![recursion_limit="256"] -extern crate proc_macro; - pub use errors; use rustc_data_structures::sync::Lock; use rustc_index::bit_set::GrowableBitSet; @@ -34,26 +29,7 @@ use syntax_pos::edition::Edition; #[cfg(test)] mod tests; -const MACRO_ARGUMENTS: Option<&'static str> = Some("macro arguments"); - -// A variant of 'try!' that panics on an Err. This is used as a crutch on the -// way towards a non-panic!-prone parser. It should be used for fatal parsing -// errors; eventually we plan to convert all code using panictry to just use -// normal try. -#[macro_export] -macro_rules! panictry { - ($e:expr) => ({ - use std::result::Result::{Ok, Err}; - use errors::FatalError; - match $e { - Ok(e) => e, - Err(mut e) => { - e.emit(); - FatalError.raise() - } - } - }) -} +pub const MACRO_ARGUMENTS: Option<&'static str> = Some("macro arguments"); // A variant of 'panictry!' that works on a Vec<Diagnostic> instead of a single DiagnosticBuilder. macro_rules! panictry_buffer { @@ -157,19 +133,4 @@ pub mod print { mod helpers; } -pub mod ext { - mod placeholders; - mod proc_macro_server; - - pub use syntax_pos::hygiene; - pub use mbe::macro_rules::compile_declarative_macro; - pub mod allocator; - pub mod base; - pub mod build; - pub mod expand; - pub mod proc_macro; - - crate mod mbe; -} - pub mod early_buffered_lints; |
