Skip to content

Conversation

@alexcrichton
Copy link
Member

It asserted that the previous count was always nonnegative, but DISCONNECTED is
a valid value for it to see. In order to continue to remember to store
DISCONNECTED after DISCONNECTED was seen, I also added a helper method.

Closes #12226

It asserted that the previous count was always nonnegative, but DISCONNECTED is
a valid value for it to see. In order to continue to remember to store
DISCONNECTED after DISCONNECTED was seen, I also added a helper method.

Closes rust-lang#12226
@alexcrichton alexcrichton deleted the chan-select-bug branch February 14, 2014 04:22
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 25, 2022
fix rust-lang#12227 Type mismatch error shown

add box expectation hint
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 8, 2024
[`redundant_locals`]: take by-value closure captures into account

Fixes rust-lang#12225

The same problem in the linked issue can happen to regular closures too, and conveniently async blocks are closures in the HIR so fixing closures will fix async blocks as well.

changelog: [`redundant_locals`]: avoid linting when redefined variable is captured by-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failed at 'assertion failed: prev >= 0', /Users/kevin/Dev/rust/rust/src/libstd/comm/stream.rs:355

3 participants