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 tokio-rs#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 b238391
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tokio/src/macros/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ 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 b238391

Please sign in to comment.