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

unwrap_used and expect_used: trigger on uses of their _err variants #9338

Merged
merged 2 commits into from
Aug 17, 2022

Conversation

sgued
Copy link
Contributor

@sgued sgued commented Aug 15, 2022

changelog: [unwrap_used]: lint uses of unwrap_err
changelog: [expect_used]: lint uses of expect_err

fixes #9331

@rust-highfive
Copy link

r? @llogiq

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 15, 2022
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/expect_used.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/unwrap_used.rs Outdated Show resolved Hide resolved
clippy_lints/src/methods/expect_used.rs Show resolved Hide resolved
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the tests be added to tests/ui/unwrap.rs,expect.rs? The tests/ui/unwrap_expect_used.rs file is a test when both unwrap_used and expect_used are enabled.
https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_used

If expect_used is enabled, instead:

@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Aug 17, 2022

📌 Commit ab91d5a has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 17, 2022

⌛ Testing commit ab91d5a with merge 849c1c0...

@bors
Copy link
Collaborator

bors commented Aug 17, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing 849c1c0 to master...

@bors bors merged commit 849c1c0 into rust-lang:master Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unwrap-used and expect-used don't trigger on unwrap_err/expect_err
5 participants