Skip to content

Commit

Permalink
tidy check
Browse files Browse the repository at this point in the history
  • Loading branch information
rdvdev2 committed Sep 2, 2022
1 parent 6aaf96e commit fb6d205
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/check_attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ impl CheckAttrVisitor<'_> {
span: meta_item.span,
file: &file,
error: err,
} );
});
false
}
}
Expand Down
7 changes: 5 additions & 2 deletions compiler/rustc_passes/src/errors.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 2 additions & 5 deletions compiler/rustc_passes/src/lang_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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 });
}
}
}
Expand Down

0 comments on commit fb6d205

Please sign in to comment.