diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-22 18:49:12 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-03-16 10:35:24 -0500 |
| commit | bb8d4307eb723850e98bcb52d71d860a4aba220a (patch) | |
| tree | f3215627c474542776bdbcb03f634651a89b70f8 /compiler/rustc_middle/src/middle | |
| parent | 461e8078010433ff7de2db2aaae8a3cfb0847215 (diff) | |
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.
Diffstat (limited to 'compiler/rustc_middle/src/middle')
| -rw-r--r-- | compiler/rustc_middle/src/middle/stability.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/middle/stability.rs b/compiler/rustc_middle/src/middle/stability.rs index 167a097d9f8..219af6caa1a 100644 --- a/compiler/rustc_middle/src/middle/stability.rs +++ b/compiler/rustc_middle/src/middle/stability.rs @@ -258,7 +258,7 @@ fn late_report_deprecation( let kind = tcx.def_kind(def_id).descr(def_id); deprecation_suggestion(&mut diag, kind, suggestion, method_span); } - diag.emit() + diag.emit(); }); } @@ -483,7 +483,7 @@ impl<'tcx> TyCtxt<'tcx> { ) { let soft_handler = |lint, span, msg: &_| { self.struct_span_lint_hir(lint, id.unwrap_or(hir::CRATE_HIR_ID), span, |lint| { - lint.build(msg).emit() + lint.build(msg).emit(); }) }; match self.eval_stability(def_id, id, span, method_span) { |
