Skip to content

Commit 1407057

Browse files
committedFeb 21, 2024
Remove some no-longer-needed pub(crate) markers.
1 parent 8f20a54 commit 1407057

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed
 

‎compiler/rustc_errors/src/diagnostic.rs

+5-10
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,9 @@ pub struct DiagnosticBuilder<'a, G: EmissionGuarantee = ErrorGuaranteed> {
490490
/// often used as a return value, especially within the frequently-used
491491
/// `PResult` type. In theory, return value optimization (RVO) should avoid
492492
/// unnecessary copying. In practice, it does not (at the time of writing).
493-
// FIXME(nnethercote) Make private once this moves to diagnostic.rs.
494-
pub(crate) diag: Option<Box<Diagnostic>>,
493+
diag: Option<Box<Diagnostic>>,
495494

496-
// FIXME(nnethercote) Make private once this moves to diagnostic.rs.
497-
pub(crate) _marker: PhantomData<G>,
495+
_marker: PhantomData<G>,
498496
}
499497

500498
// Cloning a `DiagnosticBuilder` is a recipe for a diagnostic being emitted
@@ -1246,21 +1244,18 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
12461244
/// Takes the diagnostic. For use by methods that consume the
12471245
/// DiagnosticBuilder: `emit`, `cancel`, etc. Afterwards, `drop` is the
12481246
/// only code that will be run on `self`.
1249-
// FIXME(nnethercote) Make private once this moves to diagnostic.rs.
1250-
pub(crate) fn take_diag(&mut self) -> Diagnostic {
1247+
fn take_diag(&mut self) -> Diagnostic {
12511248
Box::into_inner(self.diag.take().unwrap())
12521249
}
12531250

12541251
/// Most `emit_producing_guarantee` functions use this as a starting point.
1255-
// FIXME(nnethercote) Make private once this moves to diagnostic.rs.
1256-
pub(crate) fn emit_producing_nothing(mut self) {
1252+
fn emit_producing_nothing(mut self) {
12571253
let diag = self.take_diag();
12581254
self.dcx.emit_diagnostic(diag);
12591255
}
12601256

12611257
/// `ErrorGuaranteed::emit_producing_guarantee` uses this.
1262-
// FIXME(nnethercote) Make private once this moves to diagnostic.rs.
1263-
pub(crate) fn emit_producing_error_guaranteed(mut self) -> ErrorGuaranteed {
1258+
fn emit_producing_error_guaranteed(mut self) -> ErrorGuaranteed {
12641259
let diag = self.take_diag();
12651260

12661261
// The only error levels that produce `ErrorGuaranteed` are

0 commit comments

Comments
 (0)
Please sign in to comment.