Privatize DiagnosticBuilder constructors
This commit is contained in:
parent
0b586b436d
commit
2a3930d43c
9 changed files with 17 additions and 19 deletions
|
@ -742,12 +742,11 @@ impl Handler {
|
|||
self.taught_diagnostics.borrow_mut().insert(code.clone())
|
||||
}
|
||||
|
||||
pub fn force_print_db(&self, mut db: DiagnosticBuilder<'_>) {
|
||||
pub fn force_print_diagnostic(&self, db: Diagnostic) {
|
||||
self.emitter.borrow_mut().emit_diagnostic(&db);
|
||||
db.cancel();
|
||||
}
|
||||
|
||||
fn emit_diagnostic(&self, diagnostic: &Diagnostic) {
|
||||
pub fn emit_diagnostic(&self, diagnostic: &Diagnostic) {
|
||||
if diagnostic.cancelled() {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue