@@ -490,11 +490,9 @@ pub struct DiagnosticBuilder<'a, G: EmissionGuarantee = ErrorGuaranteed> {
490
490
/// often used as a return value, especially within the frequently-used
491
491
/// `PResult` type. In theory, return value optimization (RVO) should avoid
492
492
/// 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 > > ,
495
494
496
- // FIXME(nnethercote) Make private once this moves to diagnostic.rs.
497
- pub ( crate ) _marker : PhantomData < G > ,
495
+ _marker : PhantomData < G > ,
498
496
}
499
497
500
498
// Cloning a `DiagnosticBuilder` is a recipe for a diagnostic being emitted
@@ -1246,21 +1244,18 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
1246
1244
/// Takes the diagnostic. For use by methods that consume the
1247
1245
/// DiagnosticBuilder: `emit`, `cancel`, etc. Afterwards, `drop` is the
1248
1246
/// 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 {
1251
1248
Box :: into_inner ( self . diag . take ( ) . unwrap ( ) )
1252
1249
}
1253
1250
1254
1251
/// 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 ) {
1257
1253
let diag = self . take_diag ( ) ;
1258
1254
self . dcx . emit_diagnostic ( diag) ;
1259
1255
}
1260
1256
1261
1257
/// `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 {
1264
1259
let diag = self . take_diag ( ) ;
1265
1260
1266
1261
// The only error levels that produce `ErrorGuaranteed` are
0 commit comments