about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/coverage/enum-tuple.rs
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2025-09-16 01:08:21 +0000
committerGitHub <noreply@github.com>2025-09-16 01:08:21 +0000
commit2a6197e375398afbb501ac71f25c943a05031403 (patch)
tree2d61a3f58d72242b1429edb853970b0141820c69 /src/test/rustdoc-ui/coverage/enum-tuple.rs
parent7a1268474100cba2c5def59fe893b59ed0709aab (diff)
parentc4da39cca328e1aaabb513f20d32c55bbbc49057 (diff)
downloadrust-2a6197e375398afbb501ac71f25c943a05031403.tar.gz
rust-2a6197e375398afbb501ac71f25c943a05031403.zip
Recognize canonical `?` pattern with `Result` (#15680)
This recognizes the following expression as being equivalent to the
question mark:

```rust
match x {
    Ok(v) => v,
    Err(e) => return Err(e.into()), // or `Into::into(x)` or `<T as Into<U>>::into(x)`
}
```

Fixes rust-lang/rust-clippy#15679

changelog: [`question_mark`]: recognizes a match with an early return
with a call to `.into()` as possibly equivalent to a question mark
Diffstat (limited to 'src/test/rustdoc-ui/coverage/enum-tuple.rs')
0 files changed, 0 insertions, 0 deletions