Skip to content

Commit

Permalink
Allow unused rules in the testsuite where the lint triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed May 5, 2022
1 parent d76a939 commit 3989f02
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/test/ui/consts/const-float-bits-conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#![feature(const_float_bits_conv)]
#![feature(const_float_classify)]
#![allow(unused_macro_rules)]

// Don't promote
const fn nop<T>(x: T) -> T { x }
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/macros/issue-41803.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// run-pass
#![allow(unused_macro_rules)]

/// A compile-time map from identifiers to arbitrary (heterogeneous) expressions
macro_rules! ident_map {
( $name:ident = { $($key:ident => $e:expr,)* } ) => {
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/macros/issue-52169.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// run-pass

#[allow(unused_macro_rules)]
macro_rules! a {
($i:literal) => { "right" };
($i:tt) => { "wrong" };
Expand Down
1 change: 1 addition & 0 deletions src/test/ui/macros/macro-first-set.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// run-pass
#![allow(unused_macro_rules)]

//{{{ issue 40569 ==============================================================

Expand Down
1 change: 1 addition & 0 deletions src/test/ui/macros/macro-literal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ macro_rules! only_expr {
};
}

#[allow(unused_macro_rules)]
macro_rules! mtester_dbg {
($l:literal) => {
&format!("macro caught literal: {:?}", $l)
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/macros/macro-pub-matcher.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// run-pass
#![allow(dead_code, unused_imports)]
#![allow(dead_code, unused_imports, unused_macro_rules)]
#![feature(crate_visibility_modifier)]

/**
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/macros/stmt_expr_attr_macro_parse.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// run-pass
#![allow(unused_macro_rules)]

macro_rules! m {
($e:expr) => {
"expr includes attr"
Expand Down
2 changes: 2 additions & 0 deletions src/test/ui/macros/type-macros-hlist.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// run-pass
#![allow(unused_macro_rules)]

use std::ops::*;

#[derive(Copy, Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Test that failing macro matchers will not cause pre-expansion errors
// even though they use a feature that is pre-expansion gated.

#[allow(unused_macro_rules)]
macro_rules! m {
($e:expr) => { 0 }; // This fails on the input below due to `, foo`.
($e:expr,) => { 1 }; // This also fails to match due to `foo`.
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/async-ident.fixed
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code, unused_variables, non_camel_case_types, non_upper_case_globals)]
#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)]
#![deny(keyword_idents)]

// edition:2015
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/rust-2018/async-ident.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(dead_code, unused_variables, non_camel_case_types, non_upper_case_globals)]
#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)]
#![deny(keyword_idents)]

// edition:2015
Expand Down

0 comments on commit 3989f02

Please sign in to comment.