Skip to content

More newsched fixes #8282

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

Closed
wants to merge 6 commits into from
Closed

Conversation

brson
Copy link
Contributor

@brson brson commented Aug 4, 2013

No description provided.

@brson
Copy link
Contributor Author

brson commented Aug 4, 2013

@toddaaro 5e180bc is important

brson added 6 commits August 4, 2013 15:11
Also fix some incorrect comments and variable names.
Otherwise interferes with the existing runtime
rustc needs *even more* megabytes when run without optimizations
Every time run_sched_once performs a 'scheduling action' it needs to guarantee
that it runs at least one more time, so enqueue another run_sched_once callback.
The primary reason it needs to do this is because not all async callbacks
are guaranteed to run, it's only guaranteed that *a* callback will run after
enqueing one - some may get dropped.

At the moment this means we wastefully create lots of callbacks to ensure that
there will *definitely* be a callback queued up to continue running the scheduler.
The logic really needs to be tightened up here.
This is no longer testable once newsched is turned on
Not compatible with newsched
@brson
Copy link
Contributor Author

brson commented Aug 4, 2013

Even with this there is still a bug in the scheduler where it exits without emptying the message queue. Can't get make check to pass yet.

@brson
Copy link
Contributor Author

brson commented Aug 5, 2013

I have an additional follow-up that fixes the remaining problem with dropped messages.

@bors bors closed this Aug 5, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 10, 2022
This commit changes the behavior of `single_match` lint.

After that, we won't lint non-exhaustive matches like this:

```rust
match Some(v) {
    Some(a) => println!("${:?}", a),
    None => {},
}
```

The rationale is that, because the type of `a` could be changed, so the
user can get non-exhaustive match after applying the suggested lint (see
rust-lang/rust-clippy#8282 (comment)
for context).

We also will lint `match` constructions with tuples. When we see the
tuples on the both arms, we will check them both at the same time, and
if they form exhaustive match, we could display the warning.

Closes rust-lang#8282
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 10, 2022
single_match: Don't lint non-exhaustive matches; support tuples

`single_match` lint:
* Don't lint exhaustive enum patterns without a wild.
  Rationale: The definition of the enum could be changed, so the user can get non-exhaustive match after applying the suggested lint (see rust-lang/rust-clippy#8282 (comment) for context).
* Lint `match` constructions with tuples (as suggested at rust-lang/rust-clippy#8282 (comment))

Closes rust-lang#8282

---

changelog: [`single_match`]: Don't lint exhaustive enum patterns without a wild.
changelog: [`single_match`]: Lint `match` constructions with tuples
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.

2 participants