Re-format let-else per rustfmt update

This commit is contained in:
Mark Rousskov
2023-07-12 21:49:27 -04:00
parent 67b0cfc761
commit cc907f80b9
162 changed files with 1404 additions and 947 deletions

View File

@@ -265,7 +265,10 @@ impl LintLevelsProvider for QueryMapExpectationsWrapper<'_> {
self.specs.lint_level_id_at_node(self.tcx, LintId::of(lint), self.cur)
}
fn push_expectation(&mut self, id: LintExpectationId, expectation: LintExpectation) {
let LintExpectationId::Stable { attr_id: Some(attr_id), hir_id, attr_index, .. } = id else { bug!("unstable expectation id should already be mapped") };
let LintExpectationId::Stable { attr_id: Some(attr_id), hir_id, attr_index, .. } = id
else {
bug!("unstable expectation id should already be mapped")
};
let key = LintExpectationId::Unstable { attr_id, lint_index: None };
self.unstable_to_stable_ids.entry(key).or_insert(LintExpectationId::Stable {
@@ -542,7 +545,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
let Ok(ids) = self.store.find_lints(&lint_name) else {
// errors handled in check_lint_name_cmdline above
continue
continue;
};
for id in ids {
// ForceWarn and Forbid cannot be overridden
@@ -685,9 +688,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
Some(lvl) => lvl,
};
let Some(mut metas) = attr.meta_item_list() else {
continue
};
let Some(mut metas) = attr.meta_item_list() else { continue };
if metas.is_empty() {
// This emits the unused_attributes lint for `#[level()]`
@@ -956,8 +957,9 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
continue;
}
let LintLevelSource::Node { name: lint_attr_name, span: lint_attr_span, .. } = *src else {
continue
let LintLevelSource::Node { name: lint_attr_name, span: lint_attr_span, .. } = *src
else {
continue;
};
self.emit_spanned_lint(