Skip to content

Commit bd98a93

Browse files
committed
Fix more tests
1 parent 5c4b4fe commit bd98a93

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

src/test/compile-fail/macro-at-most-once-rep-ambig.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(macro_at_most_once_rep)]
12+
1113
macro_rules! foo {
1214
($(a)?) => {}
1315
}

src/test/run-pass-fulldeps/auxiliary/procedural_mbe_matching.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ extern crate syntax_pos;
1818
extern crate rustc;
1919
extern crate rustc_plugin;
2020

21+
use syntax::feature_gate::Features;
2122
use syntax::parse::token::{NtExpr, NtPat};
2223
use syntax::ast::{Ident, Pat};
2324
use syntax::tokenstream::{TokenTree};
@@ -31,11 +32,17 @@ use syntax::ptr::P;
3132
use syntax_pos::Span;
3233
use rustc_plugin::Registry;
3334

35+
use std::cell::RefCell;
36+
3437
fn expand_mbe_matches(cx: &mut ExtCtxt, _: Span, args: &[TokenTree])
3538
-> Box<MacResult + 'static> {
3639

3740
let mbe_matcher = quote_tokens!(cx, $$matched:expr, $$($$pat:pat)|+);
38-
let mbe_matcher = quoted::parse(mbe_matcher.into_iter().collect(), true, cx.parse_sess);
41+
let mbe_matcher = quoted::parse(mbe_matcher.into_iter().collect(),
42+
true,
43+
cx.parse_sess,
44+
&RefCell::new(Features::new()),
45+
&[]);
3946
let map = match TokenTree::parse(cx, &mbe_matcher, args.iter().cloned().collect()) {
4047
Success(map) => map,
4148
Failure(_, tok) => {

src/test/run-pass/macro-at-most-once-rep.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(macro_at_most_once_rep)]
12+
1113
macro_rules! foo {
1214
($(a)?) => {}
1315
}

0 commit comments

Comments
 (0)