Rollup merge of #94146 - est31:let_else, r=cjgillot
Adopt let else in more places Continuation of #89933, #91018, #91481, #93046, #93590, #94011. I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs #94139, #94142, #94143, #94144.
This commit is contained in:
commit
f2d6770f77
132 changed files with 539 additions and 881 deletions
|
@ -17,6 +17,7 @@
|
|||
#![feature(array_windows)]
|
||||
#![feature(bool_to_option)]
|
||||
#![feature(crate_visibility_modifier)]
|
||||
#![feature(let_else)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(negative_impls)]
|
||||
#![feature(nll)]
|
||||
|
@ -2103,13 +2104,9 @@ where
|
|||
// If this is not an empty or invalid span, we want to hash the last
|
||||
// position that belongs to it, as opposed to hashing the first
|
||||
// position past it.
|
||||
let (file, line_lo, col_lo, line_hi, col_hi) = match ctx.span_data_to_lines_and_cols(&span)
|
||||
{
|
||||
Some(pos) => pos,
|
||||
None => {
|
||||
Hash::hash(&TAG_INVALID_SPAN, hasher);
|
||||
return;
|
||||
}
|
||||
let Some((file, line_lo, col_lo, line_hi, col_hi)) = ctx.span_data_to_lines_and_cols(&span) else {
|
||||
Hash::hash(&TAG_INVALID_SPAN, hasher);
|
||||
return;
|
||||
};
|
||||
|
||||
Hash::hash(&TAG_VALID_SPAN, hasher);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue