diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-01 07:56:44 +1000 | 
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-05-21 14:56:57 +1000 | 
| commit | ce222328d717d63e09a1fe38d8d4c20f7f5c6779 (patch) | |
| tree | e464fbd9f7c775d7b4aeb5dd0559790a56cab64a | |
| parent | d8ea4689943aa8cd7e949b10f16ebec6a8ac7132 (diff) | |
| download | rust-ce222328d717d63e09a1fe38d8d4c20f7f5c6779.tar.gz rust-ce222328d717d63e09a1fe38d8d4c20f7f5c6779.zip | |
Minor `pub` and whitespace cleanups.
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 9 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/lang_items.rs | 5 | 
2 files changed, 6 insertions, 8 deletions
| diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index aadbd747313..b1438a542ac 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -42,12 +42,9 @@ use std::collections::hash_map::Entry; #[derive(LintDiagnostic)] #[diag(passes_diagnostic_diagnostic_on_unimplemented_only_for_traits)] -pub struct DiagnosticOnUnimplementedOnlyForTraits; +struct DiagnosticOnUnimplementedOnlyForTraits; -pub(crate) fn target_from_impl_item<'tcx>( - tcx: TyCtxt<'tcx>, - impl_item: &hir::ImplItem<'_>, -) -> Target { +fn target_from_impl_item<'tcx>(tcx: TyCtxt<'tcx>, impl_item: &hir::ImplItem<'_>) -> Target { match impl_item.kind { hir::ImplItemKind::Const(..) => Target::AssocConst, hir::ImplItemKind::Fn(..) => { @@ -99,7 +96,7 @@ struct CheckAttrVisitor<'tcx> { } impl<'tcx> CheckAttrVisitor<'tcx> { - pub fn dcx(&self) -> &'tcx DiagCtxt { + fn dcx(&self) -> &'tcx DiagCtxt { self.tcx.dcx() } diff --git a/compiler/rustc_passes/src/lang_items.rs b/compiler/rustc_passes/src/lang_items.rs index a5fa94faead..b3722e99e16 100644 --- a/compiler/rustc_passes/src/lang_items.rs +++ b/compiler/rustc_passes/src/lang_items.rs @@ -149,8 +149,9 @@ impl<'ast, 'tcx> LanguageItemCollector<'ast, 'tcx> { } }; - // When there's a duplicate lang item, something went very wrong and there's no value in recovering or doing anything. - // Give the user the one message to let them debug the mess they created and then wish them farewell. + // When there's a duplicate lang item, something went very wrong and there's no value + // in recovering or doing anything. Give the user the one message to let them debug the + // mess they created and then wish them farewell. self.tcx.dcx().emit_fatal(DuplicateLangItem { local_span: item_span, lang_item_name, | 
