about summary refs log tree commit diff
path: root/src/libhexfloat
diff options
context:
space:
mode:
Diffstat (limited to 'src/libhexfloat')
-rw-r--r--src/libhexfloat/lib.rs18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/libhexfloat/lib.rs b/src/libhexfloat/lib.rs
index 448f23eaedb..54bc2802b09 100644
--- a/src/libhexfloat/lib.rs
+++ b/src/libhexfloat/lib.rs
@@ -45,27 +45,23 @@ fn main() {
        html_root_url = "http://doc.rust-lang.org/")]
 
 #![deny(deprecated_owned_vector)]
-#![feature(macro_registrar, managed_boxes)]
+#![feature(plugin_registrar, managed_boxes)]
 
 extern crate syntax;
+extern crate rustc;
 
 use syntax::ast;
-use syntax::ast::Name;
 use syntax::codemap::{Span, mk_sp};
 use syntax::ext::base;
-use syntax::ext::base::{SyntaxExtension, BasicMacroExpander, NormalTT, ExtCtxt, MacExpr};
+use syntax::ext::base::{ExtCtxt, MacExpr};
 use syntax::ext::build::AstBuilder;
 use syntax::parse;
 use syntax::parse::token;
+use rustc::plugin::Registry;
 
-#[macro_registrar]
-pub fn macro_registrar(register: |Name, SyntaxExtension|) {
-    register(token::intern("hexfloat"),
-        NormalTT(box BasicMacroExpander {
-            expander: expand_syntax_ext,
-            span: None,
-        },
-        None));
+#[plugin_registrar]
+pub fn plugin_registrar(reg: &mut Registry) {
+    reg.register_macro("hexfloat", expand_syntax_ext);
 }
 
 //Check if the literal is valid (as LLVM expects),