Skip to content

Commit 222aaba

Browse files
authored
Rollup merge of rust-lang#137712 - meithecatte:extract-binding-mode, r=oli-obk
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`.
2 parents 537577f + de25d0d commit 222aaba

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

clippy_utils/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,6 @@ pub fn capture_local_usage(cx: &LateContext<'_>, e: &Expr<'_>) -> CaptureKind {
10941094
pat.each_binding_or_first(&mut |_, id, span, _| match cx
10951095
.typeck_results()
10961096
.extract_binding_mode(cx.sess(), id, span)
1097-
.unwrap()
10981097
.0
10991098
{
11001099
ByRef::No if !is_copy(cx, cx.typeck_results().node_type(id)) => {

0 commit comments

Comments
 (0)