diff options
| author | Maja Kądziołka <maya@compilercrim.es> | 2025-02-27 09:14:31 +0100 |
|---|---|---|
| committer | Maja Kądziołka <maya@compilercrim.es> | 2025-02-27 10:19:12 +0100 |
| commit | 5765005a7fb7c7363b44c96b0c56ccbb77bb173d (patch) | |
| tree | 088e039cc58d9e5816d2e91a1090fe7fbc7b7a8b /src | |
| parent | 96cfc75584359ae7ad11cc45968059f29e7b44b7 (diff) | |
Clean up TypeckResults::extract_binding_mode
- Remove the `Option` from the result type, as `None` is never returned. - Document the difference from the `BindingMode` in `PatKind::Binding`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/clippy/clippy_utils/src/lib.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs index 7fc25e3617d..c127cdce7a7 100644 --- a/src/tools/clippy/clippy_utils/src/lib.rs +++ b/src/tools/clippy/clippy_utils/src/lib.rs @@ -1095,7 +1095,6 @@ pub fn capture_local_usage(cx: &LateContext<'_>, e: &Expr<'_>) -> CaptureKind { pat.each_binding_or_first(&mut |_, id, span, _| match cx .typeck_results() .extract_binding_mode(cx.sess(), id, span) - .unwrap() .0 { ByRef::No if !is_copy(cx, cx.typeck_results().node_type(id)) => { |
