Skip to content

Commit

Permalink
Suppress some lints that trigger don't trigger in all cfg's
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiphoseer committed May 14, 2022
1 parent 8527701 commit bcc4fbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lexical-benchmark/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ macro_rules! json_data {
}

/// Generate an array of values as static data
#[allow(unused_macro_rules)]
macro_rules! static_data {
($($fn:ident $cb:ident $f1:ident $t:tt ; )*) => ($(
fn $fn() -> &'static [$t] {
Expand Down
2 changes: 2 additions & 0 deletions lexical-parse-float/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ macro_rules! index_unchecked {

/// Index a buffer and get a mutable reference, without bounds checking.
#[cfg(not(feature = "safe"))]
#[allow(unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
*$x.get_unchecked_mut($i)
Expand All @@ -32,6 +33,7 @@ macro_rules! index_unchecked {

/// Index a buffer and get a mutable reference, with bounds checking.
#[cfg(feature = "safe")]
#[allow(unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
$x[$i]
Expand Down
2 changes: 2 additions & 0 deletions lexical-write-integer/src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ macro_rules! index_unchecked {
// The newer version of the lint is `unused_macro_rules`, but this isn't
// supported until nightly-2022-05-12.
#[cfg(not(feature = "safe"))]
#[allow(unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
*$x.get_unchecked_mut($i)
Expand Down Expand Up @@ -53,6 +54,7 @@ macro_rules! index_unchecked {
// The newer version of the lint is `unused_macro_rules`, but this isn't
// supported until nightly-2022-05-12.
#[cfg(feature = "safe")]
#[allow(unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
$x[$i]
Expand Down

0 comments on commit bcc4fbb

Please sign in to comment.