Skip to content

Commit

Permalink
Revert "Work around clippy semicolon_if_nothing_returned regression"
Browse files Browse the repository at this point in the history
This reverts commit 264221e.
  • Loading branch information
dtolnay committed Mar 17, 2022
1 parent 3d12669 commit 05fcc34
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -745,15 +745,9 @@ macro_rules! quote_token_with_context {
// warnings on anything below the loop. We use has_iter to detect and
// fail to compile when there are no iterators, so here we just work
// around the unneeded extra warning.
//
// FIXME: temporariliy working around Clippy regression.
// https://github.com/rust-lang/rust-clippy/issues/7768
loop {
while true {
$crate::pounded_var_names!(quote_bind_next_or_break!() () $($inner)*);
$crate::quote_each_token!($tokens $($inner)*);
if false {
break;
}
}
}};
($tokens:ident $b3:tt $b2:tt # (( $($inner:tt)* )) * $a2:tt $a3:tt) => {};
Expand All @@ -765,16 +759,13 @@ macro_rules! quote_token_with_context {
let has_iter = $crate::__private::ThereIsNoIteratorInRepetition;
$crate::pounded_var_names!(quote_bind_into_iter!(has_iter) () $($inner)*);
let _: $crate::__private::HasIterator = has_iter;
loop {
while true {
$crate::pounded_var_names!(quote_bind_next_or_break!() () $($inner)*);
if _i > 0 {
$crate::quote_token!($tokens $sep);
}
_i += 1;
$crate::quote_each_token!($tokens $($inner)*);
if false {
break;
}
}
}};
($tokens:ident $b3:tt $b2:tt # (( $($inner:tt)* )) $sep:tt * $a3:tt) => {};
Expand Down Expand Up @@ -810,15 +801,9 @@ macro_rules! quote_token_with_context_spanned {
// warnings on anything below the loop. We use has_iter to detect and
// fail to compile when there are no iterators, so here we just work
// around the unneeded extra warning.
//
// FIXME: temporariliy working around Clippy regression.
// https://github.com/rust-lang/rust-clippy/issues/7768
loop {
while true {
$crate::pounded_var_names!(quote_bind_next_or_break!() () $($inner)*);
$crate::quote_each_token_spanned!($tokens $span $($inner)*);
if false {
break;
}
}
}};
($tokens:ident $span:ident $b3:tt $b2:tt # (( $($inner:tt)* )) * $a2:tt $a3:tt) => {};
Expand All @@ -830,16 +815,13 @@ macro_rules! quote_token_with_context_spanned {
let has_iter = $crate::__private::ThereIsNoIteratorInRepetition;
$crate::pounded_var_names!(quote_bind_into_iter!(has_iter) () $($inner)*);
let _: $crate::__private::HasIterator = has_iter;
loop {
while true {
$crate::pounded_var_names!(quote_bind_next_or_break!() () $($inner)*);
if _i > 0 {
$crate::quote_token_spanned!($tokens $span $sep);
}
_i += 1;
$crate::quote_each_token_spanned!($tokens $span $($inner)*);
if false {
break;
}
}
}};
($tokens:ident $span:ident $b3:tt $b2:tt # (( $($inner:tt)* )) $sep:tt * $a3:tt) => {};
Expand Down

0 comments on commit 05fcc34

Please sign in to comment.