about summary refs log tree commit diff
path: root/compiler/rustc_errors
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-02-21 09:57:58 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-02-21 11:03:33 +1100
commit1407057b167e35c9ff68b66d454f70c98c6f7ac9 (patch)
tree4662db6148fb18e3367541563df8ec0ce5986c35 /compiler/rustc_errors
parent8f20a54c6d4440ec58f78549878b9baabbf7f218 (diff)
downloadrust-1407057b167e35c9ff68b66d454f70c98c6f7ac9.tar.gz
rust-1407057b167e35c9ff68b66d454f70c98c6f7ac9.zip
Remove some no-longer-needed `pub(crate)` markers.
Diffstat (limited to 'compiler/rustc_errors')
-rw-r--r--compiler/rustc_errors/src/diagnostic.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs
index 686a3dc66a1..f096f015910 100644
--- a/compiler/rustc_errors/src/diagnostic.rs
+++ b/compiler/rustc_errors/src/diagnostic.rs
@@ -490,11 +490,9 @@ pub struct DiagnosticBuilder<'a, G: EmissionGuarantee = ErrorGuaranteed> {
     /// often used as a return value, especially within the frequently-used
     /// `PResult` type. In theory, return value optimization (RVO) should avoid
     /// unnecessary copying. In practice, it does not (at the time of writing).
-    // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
-    pub(crate) diag: Option<Box<Diagnostic>>,
+    diag: Option<Box<Diagnostic>>,
 
-    // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
-    pub(crate) _marker: PhantomData<G>,
+    _marker: PhantomData<G>,
 }
 
 // Cloning a `DiagnosticBuilder` is a recipe for a diagnostic being emitted
@@ -1246,21 +1244,18 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
     /// Takes the diagnostic. For use by methods that consume the
     /// DiagnosticBuilder: `emit`, `cancel`, etc. Afterwards, `drop` is the
     /// only code that will be run on `self`.
-    // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
-    pub(crate) fn take_diag(&mut self) -> Diagnostic {
+    fn take_diag(&mut self) -> Diagnostic {
         Box::into_inner(self.diag.take().unwrap())
     }
 
     /// Most `emit_producing_guarantee` functions use this as a starting point.
-    // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
-    pub(crate) fn emit_producing_nothing(mut self) {
+    fn emit_producing_nothing(mut self) {
         let diag = self.take_diag();
         self.dcx.emit_diagnostic(diag);
     }
 
     /// `ErrorGuaranteed::emit_producing_guarantee` uses this.
-    // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
-    pub(crate) fn emit_producing_error_guaranteed(mut self) -> ErrorGuaranteed {
+    fn emit_producing_error_guaranteed(mut self) -> ErrorGuaranteed {
         let diag = self.take_diag();
 
         // The only error levels that produce `ErrorGuaranteed` are