From f0b5820fa5b29d840e700ee5d760b55d291311c3 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 5 Oct 2023 09:49:10 +0000 Subject: [PATCH] Fix review comments --- compiler/rustc_codegen_cranelift/src/driver/aot.rs | 2 +- compiler/rustc_codegen_ssa/src/assert_module_sources.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/src/driver/aot.rs b/compiler/rustc_codegen_cranelift/src/driver/aot.rs index aaead1ffc5f..49f51f9f956 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/aot.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/aot.rs @@ -412,7 +412,7 @@ pub(crate) fn run_aot( ) .0 } - CguReuse::PreLto => unreachable!(), + CguReuse::PreLto => unreachable!("LTO not yet supported"), CguReuse::PostLto => { concurrency_limiter.job_already_done(); OngoingModuleCodegen::Sync(reuse_workproduct_for_cgu(tcx, cgu)) diff --git a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs index 27873dd2e1a..16bb7b12bd3 100644 --- a/compiler/rustc_codegen_ssa/src/assert_module_sources.rs +++ b/compiler/rustc_codegen_ssa/src/assert_module_sources.rs @@ -227,14 +227,14 @@ pub struct CguReuseTracker { } impl CguReuseTracker { - pub fn new() -> CguReuseTracker { + fn new() -> CguReuseTracker { let data = TrackerData { actual_reuse: Default::default(), expected_reuse: Default::default() }; CguReuseTracker { data: Some(data) } } - pub fn new_disabled() -> CguReuseTracker { + fn new_disabled() -> CguReuseTracker { CguReuseTracker { data: None } } @@ -247,7 +247,7 @@ impl CguReuseTracker { } } - pub fn set_expectation( + fn set_expectation( &mut self, cgu_name: Symbol, cgu_user_name: &str, @@ -265,7 +265,7 @@ impl CguReuseTracker { } } - pub fn check_expected_reuse(&self, sess: &Session) { + fn check_expected_reuse(&self, sess: &Session) { if let Some(ref data) = self.data { for (cgu_name, &(ref cgu_user_name, ref error_span, expected_reuse, comparison_kind)) in &data.expected_reuse