Skip to content

Conversation

@alexcrichton
Copy link
Member

As noted by @jwise here, it's probably a good idea to keep these unsafe.

The lint check won't warn about these because it ignore unsafe fn declarations.

@alexcrichton
Copy link
Member Author

cc #6335

bors added a commit that referenced this pull request May 10, 2013
As noted by @jwise [here](5244512#commitcomment-3172192), it's probably a good idea to keep these unsafe.

The lint check won't warn about these because it ignore `unsafe fn` declarations.
@bors bors closed this May 10, 2013
@bors bors merged commit d6efbad into rust-lang:incoming May 10, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2020
…=ebroto

Change `redundant_pattern_matching` to also lint `std::task::Poll`

`reduntant_pattern_matching` currently lints pattern matching on `Option` and `Result` where the `is_variant` utility methods could be used instead: `is_some`, `is_none`, `is_ok`, `is_err`. This PR extends this behaviour to `std::task::Poll`, suggesting the methods `is_pending` and `is_ready`.

Motivation: The current description of `redundant_pattern_matching` mentions

> It's more concise and clear to just use the proper utility function

which in my mind applies to `Poll` as well.

changelog: Enhance [`redundant_pattern_matching`] to also lint on `std::task::Poll`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2020
… r=ebroto

Enhance `redundant_pattern_matching` to also lint on `std::net::IpAddr`

Follow-up to rust-lang#6339
r? `@ebroto`

(note: also contains a small cleanup of the other ui tests)

changelog: Enhance [`redundant_pattern_matching`] to also lint on `std::net::IpAddr`
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.

3 participants