Skip to content

Commit

Permalink
Merge pull request #83 from Xiphoseer/patch-3
Browse files Browse the repository at this point in the history
Suppress some lints that trigger don't trigger in all cfg's
  • Loading branch information
Alexhuszagh committed May 16, 2022
2 parents 0fdaa9f + 1dd90f1 commit 0cf23c8
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 @@ -90,6 +90,7 @@ macro_rules! json_data {
}

/// Generate an array of values as static data
#[allow(unknown_lints, 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(unknown_lints, 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(unknown_lints, 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 @@ -21,6 +21,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(unknown_lints, unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
*$x.get_unchecked_mut($i)
Expand Down Expand Up @@ -52,6 +53,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(unknown_lints, unused_macro_rules)]
macro_rules! index_unchecked_mut {
($x:ident[$i:expr]) => {
$x[$i]
Expand Down

0 comments on commit 0cf23c8

Please sign in to comment.