diff options
| author | bors <bors@rust-lang.org> | 2014-09-20 03:11:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-20 03:11:12 +0000 |
| commit | aef6c4b1382dcf2f943bd5872656625f935c0b7c (patch) | |
| tree | 95920a7c62cbc07301ec8fe4b189b33e208327cd /src/libsyntax/diagnostics/plugin.rs | |
| parent | 3b6e880fffb8e09b15bc6fc41d5b23f21bf5056d (diff) | |
| parent | f082416bece7cbb16ec46f870fb7f91ca15f2231 (diff) | |
| download | rust-aef6c4b1382dcf2f943bd5872656625f935c0b7c.tar.gz rust-aef6c4b1382dcf2f943bd5872656625f935c0b7c.zip | |
auto merge of #17399 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libsyntax/diagnostics/plugin.rs')
| -rw-r--r-- | src/libsyntax/diagnostics/plugin.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax/diagnostics/plugin.rs b/src/libsyntax/diagnostics/plugin.rs index 132b59c89b2..d3c39284f55 100644 --- a/src/libsyntax/diagnostics/plugin.rs +++ b/src/libsyntax/diagnostics/plugin.rs @@ -13,7 +13,7 @@ use std::collections::HashMap; use ast; use ast::{Ident, Name, TokenTree}; use codemap::Span; -use ext::base::{ExtCtxt, MacExpr, MacItem, MacResult}; +use ext::base::{ExtCtxt, MacExpr, MacResult, MacItems}; use ext::build::AstBuilder; use parse::token; use ptr::P; @@ -102,7 +102,7 @@ pub fn expand_register_diagnostic<'cx>(ecx: &'cx mut ExtCtxt, let sym = Ident::new(token::gensym(( "__register_diagnostic_".to_string() + token::get_ident(*code).get() ).as_slice())); - MacItem::new(quote_item!(ecx, mod $sym {}).unwrap()) + MacItems::new(vec![quote_item!(ecx, mod $sym {}).unwrap()].into_iter()) } pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, @@ -133,7 +133,7 @@ pub fn expand_build_diagnostic_array<'cx>(ecx: &'cx mut ExtCtxt, (descriptions.len(), ecx.expr_vec(span, descriptions)) }) }); - MacItem::new(quote_item!(ecx, + MacItems::new(vec![quote_item!(ecx, pub static $name: [(&'static str, &'static str), ..$count] = $expr; - ).unwrap()) + ).unwrap()].into_iter()) } |
