about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/lib.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-27 18:59:29 +0200
committerGitHub <noreply@github.com>2024-08-27 18:59:29 +0200
commit489eb230ddbcdf4ccd5b00db165a8844fac9c047 (patch)
treeb397a8e2cb3db9cf6392c7c28c0f424768c45f2f /compiler/rustc_errors/src/lib.rs
parent02491259c2f54b026ac6be939de6b67c8c73c319 (diff)
parent22cdd632f1a98830ead8f03cf7f227cc72d814a8 (diff)
Rollup merge of #129648 - nnethercote:unreachable_pub-2, r=Urgau
More `unreachable_pub`

Add `unreachable_pub` checking to some more compiler crates. A follow-up to #126013.

r? ``@Urgau``
Diffstat (limited to 'compiler/rustc_errors/src/lib.rs')
-rw-r--r--compiler/rustc_errors/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index fd203c38318..99ee8fb17d7 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -25,6 +25,7 @@
 #![feature(trait_alias)]
 #![feature(try_blocks)]
 #![feature(yeet_expr)]
+#![warn(unreachable_pub)]
 // tidy-alphabetical-end
 
 extern crate self as rustc_errors;
@@ -1701,7 +1702,7 @@ impl DiagCtxtInner {
     }
 
     /// Translate `message` eagerly with `args` to `SubdiagMessage::Eager`.
-    pub fn eagerly_translate<'a>(
+    fn eagerly_translate<'a>(
         &self,
         message: DiagMessage,
         args: impl Iterator<Item = DiagArg<'a>>,
@@ -1710,7 +1711,7 @@ impl DiagCtxtInner {
     }
 
     /// Translate `message` eagerly with `args` to `String`.
-    pub fn eagerly_translate_to_string<'a>(
+    fn eagerly_translate_to_string<'a>(
         &self,
         message: DiagMessage,
         args: impl Iterator<Item = DiagArg<'a>>,