Skip to content

Commit ce22232

Browse files
committed
Minor pub and whitespace cleanups.
1 parent d8ea468 commit ce22232

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

compiler/rustc_passes/src/check_attr.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,9 @@ use std::collections::hash_map::Entry;
4242

4343
#[derive(LintDiagnostic)]
4444
#[diag(passes_diagnostic_diagnostic_on_unimplemented_only_for_traits)]
45-
pub struct DiagnosticOnUnimplementedOnlyForTraits;
45+
struct DiagnosticOnUnimplementedOnlyForTraits;
4646

47-
pub(crate) fn target_from_impl_item<'tcx>(
48-
tcx: TyCtxt<'tcx>,
49-
impl_item: &hir::ImplItem<'_>,
50-
) -> Target {
47+
fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>) -> Target {
5148
match impl_item.kind {
5249
hir::ImplItemKind::Const(..) => Target::AssocConst,
5350
hir::ImplItemKind::Fn(..) => {
@@ -99,7 +96,7 @@ struct CheckAttrVisitor<'tcx> {
9996
}
10097

10198
impl<'tcx> CheckAttrVisitor<'tcx> {
102-
pub fn dcx(&self) -> &'tcx DiagCtxt {
99+
fn dcx(&self) -> &'tcx DiagCtxt {
103100
self.tcx.dcx()
104101
}
105102

compiler/rustc_passes/src/lang_items.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ impl<'ast, 'tcx> LanguageItemCollector<'ast, 'tcx> {
149149
}
150150
};
151151

152-
// When there's a duplicate lang item, something went very wrong and there's no value in recovering or doing anything.
153-
// Give the user the one message to let them debug the mess they created and then wish them farewell.
152+
// When there's a duplicate lang item, something went very wrong and there's no value
153+
// in recovering or doing anything. Give the user the one message to let them debug the
154+
// mess they created and then wish them farewell.
154155
self.tcx.dcx().emit_fatal(DuplicateLangItem {
155156
local_span: item_span,
156157
lang_item_name,

0 commit comments

Comments
 (0)