Skip to content

Commit

Permalink
Fix select macro giving warning when branch's returns never
Browse files Browse the repository at this point in the history
Solves #2665 by adding #[allow(unreachable_code)] inside a branch
matching arm.
  • Loading branch information
blasrodri authored and dungex committed Jul 22, 2020
1 parent 21f7260 commit 274ae25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tokio/src/macros/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ macro_rules! select {
}
match branch {
$(
#[allow(unreachable_code)]
$crate::count!( $($skip)* ) => {
// First, if the future has previously been
// disabled, do not poll it again. This is done
Expand Down

0 comments on commit 274ae25

Please sign in to comment.