Skip to content

Add timers to core #6435

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
brson opened this issue May 12, 2013 · 3 comments
Closed

Add timers to core #6435

brson opened this issue May 12, 2013 · 3 comments
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented May 12, 2013

Timers are provided by the runtime, specifically by uv. We will want a core::unstable::timer (to be promoted to core::timer) module with an API that can be backed either by libuv or by blocking implementations.

@recrack
Copy link
Contributor

recrack commented May 13, 2013

I think it change from std::timer to core::timer,
not core::unstable::timer
Am i right?

@bblum
Copy link
Contributor

bblum commented Jun 10, 2013

All the above issues are ones I think will be deprecated when the old stuff in libextra is replaced.

@ghost ghost assigned olsonjeffery Jul 15, 2013
@olsonjeffery
Copy link
Contributor

I'm taking this

@bors bors closed this as completed in ff34064 Jul 23, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 20, 2020
…gle-binding, r=ebroto

Fixing a false positive for the `match_single_binding` lint rust-lang#5552

This is a fix for a false positive in the `match_single_binding` lint when using `#[cfg()]` on a branch. It is sadly a bit hacky but maybe the best solution as rust removes the other branch from the AST before we can even validate it. This fix looks at the code snippet itself and returns if it includes another thick arrow `=>` besides the one matching arm we found. This can again cause false negatives if someone has the following code:
```rust
match x {
    // => <-- Causes a false negative
    _ => 1,
}
```

I thought about making the code more complex and maybe validating against other things like the `#[cfg()]` macro but I believe that this is the best solution. This has basically switched the issue from a false positive to a false negative in a very specific case.

I'm happy to make some changes if you have any suggestions 🙃.

---
Fixes rust-lang#5552

changelog: Fixed a false positive in the `match_single_binding` lint with `#[cfg()]` macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-runtime Area: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants