summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2022-09-16 11:01:02 +0400
committerMaybe Waffle <waffle.lapkin@gmail.com>2022-10-01 10:03:06 +0000
commita8f7e244b785feb1b1d696abf0a7efb5cb7aed30 (patch)
tree494e24f05b9fe3dfe766207727a83d369c218c22 /compiler/rustc_const_eval/src
parent65445a571c11f07f4ca1ed0f63bad247ae295bd0 (diff)
downloadrust-a8f7e244b785feb1b1d696abf0a7efb5cb7aed30.tar.gz
rust-a8f7e244b785feb1b1d696abf0a7efb5cb7aed30.zip
Refactor rustc lint API
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/const_eval/error.rs6
1 files changed, 3 insertions, 3 deletions
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