html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
html_root_url = "https://doc.rust-lang.org/nightly/")]
+#![unstable(feature = "rustc_private", issue = "27812")]
+
#![feature(rustc_private)]
+#![feature(staged_api)]
#![feature(str_char)]
extern crate fmt_macros;
+#[macro_use]
extern crate syntax;
use syntax::ext::base::{MacroExpanderFn, NormalTT};
use syntax::ext::base::{SyntaxEnv, SyntaxExtension};
use syntax::parse::token::intern;
-// A variant of 'try!' that panics on Err(FatalError). 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_rules! panictry {
- ($e:expr) => ({
- use std::result::Result::{Ok, Err};
- use syntax::diagnostic::FatalError;
- match $e {
- Ok(e) => e,
- Err(FatalError) => panic!(FatalError)
- }
- })
-}
mod asm;
mod cfg;
mod concat;
mod concat_idents;
-mod deriving;
mod env;
mod format;
mod log_syntax;
mod trace_macros;
+// for custom_derive
+pub mod deriving;
+
pub fn register_builtins(env: &mut SyntaxEnv) {
// utility function to simplify creating NormalTT syntax extensions
fn builtin_normal_expander(f: MacroExpanderFn) -> SyntaxExtension {