Skip to content

unwrap_in_result: allow unwrapping infallible result type#16711

Open
zihan0822 wants to merge 1 commit intorust-lang:masterfrom
zihan0822:unwrap-in-result-infallible-err
Open

unwrap_in_result: allow unwrapping infallible result type#16711
zihan0822 wants to merge 1 commit intorust-lang:masterfrom
zihan0822:unwrap-in-result-infallible-err

Conversation

@zihan0822
Copy link
Copy Markdown
Contributor

@zihan0822 zihan0822 commented Mar 13, 2026

fixes #16709

changelog: [unwrap_in_result]: allow unwrapping infallible result type

changelog: [`unwrap_in_result`]: allow unwrapping infallible result type

Signed-off-by: Zihan <zihanli0822@gmail.com>
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 13, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 13, 2026

r? @Jarcho

rustbot has assigned @Jarcho.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 7 candidates
  • 7 candidates expanded to 7 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

@github-actions
Copy link
Copy Markdown

Lintcheck changes for c8dab51

Lint Added Removed Changed
clippy::unwrap_in_result 0 4 1

This comment will be updated if you push new changes

@samueltardieu
Copy link
Copy Markdown
Member

Related: #16712

The current test is too naive. If #16712 is merged first, you should use is_visibly_uninhabited instead of is_never_like.

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 false positive with Infallible return value

4 participants