summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-16 15:39:45 +0100
committerGitHub <noreply@github.com>2022-11-16 15:39:45 +0100
commit353b915fecd7feb30127b3107ea091a1a28f5e4a (patch)
tree09683fbdf0f8faa79ac77eafe6bc8ae492acff6f /compiler/rustc_codegen_ssa/src
parentfbcd751ea15e96c293f83655be31e64a5751fa36 (diff)
parent1115ec601a7f7dc2406e26cd5da0faf031043b81 (diff)
downloadrust-353b915fecd7feb30127b3107ea091a1a28f5e4a.tar.gz
rust-353b915fecd7feb30127b3107ea091a1a28f5e4a.zip
Rollup merge of #104317 - RalfJung:ctfe-error-reporting, r=oli-obk
cleanup and dedupe CTFE and Miri error reporting

It looks like most of the time, this error raised from const_prop_lint is just redundant -- it duplicates the error reported when evaluating the const-eval query. This lets us make `ConstEvalErr` private to the const_eval module which I think is a good step.

The Miri change mostly replaces a `match` by `if let`, and dedupes the "this error is impossible in Miri" checks.

r? ``@oli-obk``
Fixes https://github.com/rust-lang/rust/issues/75461
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs
index da9aaf00ecf..f4a300ef2c5 100644
--- a/compiler/rustc_codegen_ssa/src/mir/mod.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs
@@ -189,7 +189,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
             all_consts_ok = false;
             match err {
                 // errored or at least linted
-                ErrorHandled::Reported(_) | ErrorHandled::Linted => {}
+                ErrorHandled::Reported(_) => {}
                 ErrorHandled::TooGeneric => {
                     span_bug!(const_.span, "codegen encountered polymorphic constant: {:?}", err)
                 }