rustc_error: make ErrorReported impossible to construct
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
This commit is contained in:
parent
461e807801
commit
bb8d4307eb
104 changed files with 705 additions and 550 deletions
|
@ -1742,7 +1742,7 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
|
|||
descr,
|
||||
self.tcx.crate_name(def_id.krate)
|
||||
))
|
||||
.emit()
|
||||
.emit();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -1786,7 +1786,9 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
|
|||
lint::builtin::PRIVATE_IN_PUBLIC,
|
||||
hir_id,
|
||||
span,
|
||||
|lint| lint.build(&format!("{} (error {})", make_msg(), err_code)).emit(),
|
||||
|lint| {
|
||||
lint.build(&format!("{} (error {})", make_msg(), err_code)).emit();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue