Skip to content

Commit

Permalink
Auto merge of #7335 - ehuss:fix-plugin, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix test for changes in plugin API.

Updates for rust-lang/rust#64041
  • Loading branch information
bors committed Sep 6, 2019
2 parents cf03f71 + 803b9cd commit 62dfd31
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testsuite/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fn plugin_deps() {
extern crate syntax;
use rustc_driver::plugin::Registry;
use syntax::tokenstream::TokenTree;
use syntax::tokenstream::TokenStream;
use syntax::source_map::Span;
use syntax::ast::*;
use syntax::ext::base::{ExtCtxt, MacEager, MacResult};
Expand All @@ -215,7 +215,7 @@ fn plugin_deps() {
reg.register_macro("bar", expand_bar);
}
fn expand_bar(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
fn expand_bar(cx: &mut ExtCtxt, sp: Span, tts: TokenStream)
-> Box<MacResult + 'static> {
MacEager::expr(cx.expr_lit(sp, LitKind::Int(1, LitIntType::Unsuffixed)))
}
Expand Down Expand Up @@ -301,7 +301,7 @@ fn plugin_to_the_max() {
extern crate baz;
use rustc_driver::plugin::Registry;
use syntax::tokenstream::TokenTree;
use syntax::tokenstream::TokenStream;
use syntax::source_map::Span;
use syntax::ast::*;
use syntax::ext::base::{ExtCtxt, MacEager, MacResult};
Expand All @@ -312,7 +312,7 @@ fn plugin_to_the_max() {
reg.register_macro("bar", expand_bar);
}
fn expand_bar(cx: &mut ExtCtxt, sp: Span, tts: &[TokenTree])
fn expand_bar(cx: &mut ExtCtxt, sp: Span, tts: TokenStream)
-> Box<MacResult + 'static> {
let bar = Ident::from_str("baz");
let path = cx.path(sp, vec![bar.clone(), bar]);
Expand Down

0 comments on commit 62dfd31

Please sign in to comment.