From fb6d20572c6adf403a0984c01223881366db35f8 Mon Sep 17 00:00:00 2001 From: rdvdev2 Date: Fri, 2 Sep 2022 05:44:20 +0200 Subject: [PATCH] tidy check --- compiler/rustc_passes/src/check_attr.rs | 2 +- compiler/rustc_passes/src/errors.rs | 7 +++++-- compiler/rustc_passes/src/lang_items.rs | 7 ++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index 7532c798b3cbc..d7fa6d8dd4376 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -1846,7 +1846,7 @@ impl CheckAttrVisitor<'_> { span: meta_item.span, file: &file, error: err, - } ); + }); false } } diff --git a/compiler/rustc_passes/src/errors.rs b/compiler/rustc_passes/src/errors.rs index bb47b511fca93..725042c2784b9 100644 --- a/compiler/rustc_passes/src/errors.rs +++ b/compiler/rustc_passes/src/errors.rs @@ -1,6 +1,6 @@ use std::{io::Error, path::Path}; -use rustc_errors::{Applicability, MultiSpan, ErrorGuaranteed}; +use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan}; use rustc_hir::Target; use rustc_macros::{LintDiagnostic, SessionDiagnostic, SessionSubdiagnostic}; use rustc_session::SessionDiagnostic; @@ -706,7 +706,10 @@ pub struct InvalidAttrAtCrateLevel { } impl SessionDiagnostic<'_> for InvalidAttrAtCrateLevel { - fn into_diagnostic(self, sess: &'_ rustc_session::parse::ParseSess) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> { + fn into_diagnostic( + self, + sess: &'_ rustc_session::parse::ParseSess, + ) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> { let mut diag = sess.struct_err(rustc_errors::fluent::passes::invalid_attr_at_crate_level); diag.set_span(self.span); diag.set_arg("name", self.name); diff --git a/compiler/rustc_passes/src/lang_items.rs b/compiler/rustc_passes/src/lang_items.rs index 98ff625d09469..24657372486f2 100644 --- a/compiler/rustc_passes/src/lang_items.rs +++ b/compiler/rustc_passes/src/lang_items.rs @@ -7,8 +7,8 @@ //! * Traits that represent operators; e.g., `Add`, `Sub`, `Index`. //! * Functions called by the compiler itself. -use crate::errors::{LangItemOnIncorrectTarget, UnknownLangItem}; use crate::check_attr::target_from_impl_item; +use crate::errors::{LangItemOnIncorrectTarget, UnknownLangItem}; use crate::weak_lang_items; use rustc_errors::{pluralize, struct_span_err}; @@ -52,10 +52,7 @@ impl<'tcx> LanguageItemCollector<'tcx> { } // Unknown lang item. _ => { - self.tcx.sess.emit_err(UnknownLangItem { - span, - name: value, - }); + self.tcx.sess.emit_err(UnknownLangItem { span, name: value }); } } }