Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax an assertion in start_selection() #12227

Closed
wants to merge 1 commit into from

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