rustc_errors: let DiagnosticBuilder::emit return a "guarantee of emission".

This commit is contained in:
Eduard-Mihai Burtescu 2022-01-27 09:44:25 +00:00
parent 0b9d70cf6d
commit b7e95dee65
83 changed files with 842 additions and 471 deletions

View file

@ -64,7 +64,7 @@ impl<'tcx> ConstMutationChecker<'_, 'tcx> {
place: &Place<'tcx>,
const_item: DefId,
location: Location,
decorate: impl for<'b> FnOnce(LintDiagnosticBuilder<'b>) -> DiagnosticBuilder<'b>,
decorate: impl for<'b> FnOnce(LintDiagnosticBuilder<'b>) -> DiagnosticBuilder<'b, ()>,
) {
// Don't lint on borrowing/assigning when a dereference is involved.
// If we 'leave' the temporary via a dereference, we must