Skip to content

Commit 3989f02

Browse files
committed
Allow unused rules in the testsuite where the lint triggers
1 parent d76a939 commit 3989f02

11 files changed

+14
-3
lines changed

src/test/ui/consts/const-float-bits-conv.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#![feature(const_float_bits_conv)]
55
#![feature(const_float_classify)]
6+
#![allow(unused_macro_rules)]
67

78
// Don't promote
89
const fn nop<T>(x: T) -> T { x }

src/test/ui/macros/issue-41803.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// run-pass
2+
#![allow(unused_macro_rules)]
3+
24
/// A compile-time map from identifiers to arbitrary (heterogeneous) expressions
35
macro_rules! ident_map {
46
( $name:ident = { $($key:ident => $e:expr,)* } ) => {

src/test/ui/macros/issue-52169.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// run-pass
22

3+
#[allow(unused_macro_rules)]
34
macro_rules! a {
45
($i:literal) => { "right" };
56
($i:tt) => { "wrong" };

src/test/ui/macros/macro-first-set.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
#![allow(unused_macro_rules)]
23

34
//{{{ issue 40569 ==============================================================
45

src/test/ui/macros/macro-literal.rs

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ macro_rules! only_expr {
2121
};
2222
}
2323

24+
#[allow(unused_macro_rules)]
2425
macro_rules! mtester_dbg {
2526
($l:literal) => {
2627
&format!("macro caught literal: {:?}", $l)

src/test/ui/macros/macro-pub-matcher.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
#![allow(dead_code, unused_imports)]
2+
#![allow(dead_code, unused_imports, unused_macro_rules)]
33
#![feature(crate_visibility_modifier)]
44

55
/**

src/test/ui/macros/stmt_expr_attr_macro_parse.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// run-pass
2+
#![allow(unused_macro_rules)]
3+
24
macro_rules! m {
35
($e:expr) => {
46
"expr includes attr"

src/test/ui/macros/type-macros-hlist.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// run-pass
2+
#![allow(unused_macro_rules)]
3+
24
use std::ops::*;
35

46
#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]

src/test/ui/parser/issues/issue-65846-rollback-gating-failing-matcher.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Test that failing macro matchers will not cause pre-expansion errors
44
// even though they use a feature that is pre-expansion gated.
55

6+
#[allow(unused_macro_rules)]
67
macro_rules! m {
78
($e:expr) => { 0 }; // This fails on the input below due to `, foo`.
89
($e:expr,) => { 1 }; // This also fails to match due to `foo`.

src/test/ui/rust-2018/async-ident.fixed

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(dead_code, unused_variables, non_camel_case_types, non_upper_case_globals)]
1+
#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)]
22
#![deny(keyword_idents)]
33

44
// edition:2015

src/test/ui/rust-2018/async-ident.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(dead_code, unused_variables, non_camel_case_types, non_upper_case_globals)]
1+
#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)]
22
#![deny(keyword_idents)]
33

44
// edition:2015

0 commit comments

Comments
 (0)