Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test for changes in plugin API. #7335

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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