token::FatArrow => "FatArrow",
token::Pound => "Pound",
token::Dollar => "Dollar",
+ token::Question => "Question",
token::Underscore => "Underscore",
token::Eof => "Eof",
- _ => panic!(),
+ _ => panic!("unhandled token in quote!"),
};
mk_token_path(cx, sp, name)
}
-// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
let _m: Vec<syntax::ast::TokenTree> = quote_matcher!(cx, $($foo:tt,)* bar);
let _n: syntax::ast::Attribute = quote_attr!(cx, #![cfg(foo, bar = "baz")]);
+
+ let _o: Option<P<syntax::ast::Item>> = quote_item!(cx, fn foo<T: ?Sized>() {});
}
fn main() {