rescope temp lifetime in let-chain into IfElse

apply rules by span edition
This commit is contained in:
Ding Xiang Fei 2023-01-24 16:06:35 +08:00
parent 33855f80d4
commit f93df1f7dc
No known key found for this signature in database
GPG key ID: 3CD748647EEF6359
30 changed files with 1102 additions and 35 deletions

View file

@ -334,6 +334,11 @@ lint_identifier_uncommon_codepoints = identifier contains {$codepoints_len ->
*[other] {" "}{$identifier_type}
} Unicode general security profile
lint_if_let_rescope = `if let` assigns a shorter lifetime since Edition 2024
.label = this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
.help = the value is now dropped here in Edition 2024
.suggestion = rewrite this `if let` into a `match` with a single arm to preserve the drop order up to Edition 2021
lint_ignored_unless_crate_specified = {$level}({$name}) is ignored unless specified at crate level
lint_ill_formed_attribute_input = {$num_suggestions ->