From a8f7e244b785feb1b1d696abf0a7efb5cb7aed30 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Fri, 16 Sep 2022 11:01:02 +0400 Subject: Refactor rustc lint API --- compiler/rustc_const_eval/src/const_eval/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'compiler/rustc_const_eval/src') diff --git a/compiler/rustc_const_eval/src/const_eval/error.rs b/compiler/rustc_const_eval/src/const_eval/error.rs index 09d53331b5b..09c92ae0361 100644 --- a/compiler/rustc_const_eval/src/const_eval/error.rs +++ b/compiler/rustc_const_eval/src/const_eval/error.rs @@ -233,10 +233,10 @@ impl<'tcx> ConstEvalErr<'tcx> { rustc_session::lint::builtin::CONST_ERR, hir_id, tcx.span, + message, |lint| { - let mut lint = lint.build(message); - finish(&mut lint, Some(err_msg)); - lint.emit(); + finish(lint, Some(err_msg)); + lint }, ); ErrorHandled::Linted -- cgit 1.4.1-3-g733a5