about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorVincent Esche <regexident@gmail.com>2016-08-24 15:43:28 +0200
committerVincent Esche <regexident@gmail.com>2016-08-24 15:43:28 +0200
commitbf22a7a71ab47a7d2074134b02b02df1d6ce497e (patch)
tree63f44ce4dc3ca737204531b444cfc8e55f8d6157 /src
parent308824acecf902f2b6a9c1538bde0324804ba68e (diff)
downloadrust-bf22a7a71ab47a7d2074134b02b02df1d6ce497e.tar.gz
rust-bf22a7a71ab47a7d2074134b02b02df1d6ce497e.zip
Updated code sample in chapter on syntax extensions.
The affected API apparently had changed with commit d59accfb065843d12db9180a4f504664e3d23ef1.
Diffstat (limited to 'src')
-rw-r--r--src/doc/book/compiler-plugins.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/book/compiler-plugins.md b/src/doc/book/compiler-plugins.md
index 8426d5a6265..a9a81843ab1 100644
--- a/src/doc/book/compiler-plugins.md
+++ b/src/doc/book/compiler-plugins.md
@@ -46,10 +46,10 @@ extern crate rustc;
 extern crate rustc_plugin;
 
 use syntax::parse::token;
-use syntax::ast::TokenTree;
+use syntax::tokenstream::TokenTree;
 use syntax::ext::base::{ExtCtxt, MacResult, DummyResult, MacEager};
 use syntax::ext::build::AstBuilder;  // trait for expr_usize
-use syntax_pos::Span;
+use syntax::ext::quote::rt::Span;
 use rustc_plugin::Registry;
 
 fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
@@ -69,7 +69,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
     }
 
     let text = match args[0] {
-        TokenTree::Token(_, token::Ident(s, _)) => s.to_string(),
+        TokenTree::Token(_, token::Ident(s)) => s.to_string(),
         _ => {
             cx.span_err(sp, "argument should be a single identifier");
             return DummyResult::any(sp);