Skip to content

Commit b36d23c

Browse files
committed
Add test, and fix the other tests
1 parent ba0601d commit b36d23c

17 files changed

+69
-0
lines changed

src/test/compile-fail-fulldeps/proc-macro/resolve-error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// aux-build:bang_proc_macro.rs
1515

1616
#![feature(proc_macro)]
17+
#![allow(unused_macros)]
1718

1819
#[macro_use]
1920
extern crate derive_foo;

src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// gate-test-allow_internal_unstable
1212

13+
#![allow(unused_macros)]
14+
1315
macro_rules! bar {
1416
() => {
1517
// more layers don't help:

src/test/compile-fail/feature-gate-allow-internal-unstable.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+
#![allow(unused_macros)]
12+
1113
#[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps
1214
macro_rules! foo {
1315
() => {}

src/test/compile-fail/invalid-macro-matcher.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+
#![allow(unused_macros)]
12+
1113
macro_rules! invalid {
1214
_ => (); //~ ERROR invalid macro matcher
1315
}

src/test/compile-fail/issue-21356.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+
#![allow(unused_macros)]
12+
1113
macro_rules! test { ($wrong:t_ty ..) => () }
1214
//~^ ERROR: invalid fragment specifier `t_ty`
1315

src/test/compile-fail/issue-39388.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+
#![allow(unused_macros)]
12+
1113
macro_rules! assign {
1214
(($($a:tt)*) = ($($b:tt))*) => { //~ ERROR expected `*` or `+`
1315
$($a)* = $($b)*

src/test/compile-fail/issue-39404.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![deny(missing_fragment_specifier)] //~ NOTE lint level defined here
12+
#![allow(unused_macros)]
1213

1314
macro_rules! m { ($i) => {} }
1415
//~^ ERROR missing fragment specifier

src/test/compile-fail/issue-5067.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+
#![allow(unused_macros)]
12+
1113
macro_rules! foo {
1214
( $()* ) => {};
1315
//~^ ERROR repetition matches empty token tree

src/test/compile-fail/macro-expansion-tests.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+
#![allow(unused_macros)]
12+
1113
mod macros_cant_escape_fns {
1214
fn f() {
1315
macro_rules! m { () => { 3 + 4 } }

src/test/compile-fail/macro-follow.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
//
1111
// Check the macro follow sets (see corresponding rpass test).
1212

13+
#![allow(unused_macros)]
14+
1315
// FOLLOW(pat) = {FatArrow, Comma, Eq, Or, Ident(if), Ident(in)}
1416
macro_rules! follow_pat {
1517
($p:pat ()) => {}; //~ERROR `$p:pat` is followed by `(`

0 commit comments

Comments
 (0)