Use let_else in some more places in rustc_lint
This commit is contained in:
parent
ff23ad3179
commit
bdc4b46221
6 changed files with 52 additions and 69 deletions
|
@ -79,9 +79,8 @@ impl<'tcx> LateLintPass<'tcx> for ArrayIntoIter {
|
|||
let receiver_ty = cx.typeck_results().expr_ty(receiver_arg);
|
||||
let adjustments = cx.typeck_results().expr_adjustments(receiver_arg);
|
||||
|
||||
let target = match adjustments.last() {
|
||||
Some(Adjustment { kind: Adjust::Borrow(_), target }) => target,
|
||||
_ => return,
|
||||
let Some(Adjustment { kind: Adjust::Borrow(_), target }) = adjustments.last() else {
|
||||
return
|
||||
};
|
||||
|
||||
let types =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue