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`.
This commit is contained in:
parent
96cfc75584
commit
5765005a7f
5 changed files with 45 additions and 45 deletions
|
|
@ -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)) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue