Skip to content

Commit fb6d205

Browse files
committed
tidy check
1 parent 6aaf96e commit fb6d205

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

compiler/rustc_passes/src/check_attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ impl CheckAttrVisitor<'_> {
18461846
span: meta_item.span,
18471847
file: &file,
18481848
error: err,
1849-
} );
1849+
});
18501850
false
18511851
}
18521852
}

compiler/rustc_passes/src/errors.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{io::Error, path::Path};
22

3-
use rustc_errors::{Applicability, MultiSpan, ErrorGuaranteed};
3+
use rustc_errors::{Applicability, ErrorGuaranteed, MultiSpan};
44
use rustc_hir::Target;
55
use rustc_macros::{LintDiagnostic, SessionDiagnostic, SessionSubdiagnostic};
66
use rustc_session::SessionDiagnostic;
@@ -706,7 +706,10 @@ pub struct InvalidAttrAtCrateLevel {
706706
}
707707

708708
impl SessionDiagnostic<'_> for InvalidAttrAtCrateLevel {
709-
fn into_diagnostic(self, sess: &'_ rustc_session::parse::ParseSess) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> {
709+
fn into_diagnostic(
710+
self,
711+
sess: &'_ rustc_session::parse::ParseSess,
712+
) -> rustc_errors::DiagnosticBuilder<'_, ErrorGuaranteed> {
710713
let mut diag = sess.struct_err(rustc_errors::fluent::passes::invalid_attr_at_crate_level);
711714
diag.set_span(self.span);
712715
diag.set_arg("name", self.name);

compiler/rustc_passes/src/lang_items.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
//! * Traits that represent operators; e.g., `Add`, `Sub`, `Index`.
88
//! * Functions called by the compiler itself.
99
10-
use crate::errors::{LangItemOnIncorrectTarget, UnknownLangItem};
1110
use crate::check_attr::target_from_impl_item;
11+
use crate::errors::{LangItemOnIncorrectTarget, UnknownLangItem};
1212
use crate::weak_lang_items;
1313

1414
use rustc_errors::{pluralize, struct_span_err};
@@ -52,10 +52,7 @@ impl<'tcx> LanguageItemCollector<'tcx> {
5252
}
5353
// Unknown lang item.
5454
_ => {
55-
self.tcx.sess.emit_err(UnknownLangItem {
56-
span,
57-
name: value,
58-
});
55+
self.tcx.sess.emit_err(UnknownLangItem { span, name: value });
5956
}
6057
}
6158
}

0 commit comments

Comments
 (0)