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_codegen_ssa/src | |
| parent | 461e8078010433ff7de2db2aaae8a3cfb0847215 (diff) | |
| download | rust-bb8d4307eb723850e98bcb52d71d860a4aba220a.tar.gz rust-bb8d4307eb723850e98bcb52d71d860a4aba220a.zip | |
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_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/mod.rs b/compiler/rustc_codegen_ssa/src/mir/mod.rs index 40a8e2388e2..6c139df0a85 100644 --- a/compiler/rustc_codegen_ssa/src/mir/mod.rs +++ b/compiler/rustc_codegen_ssa/src/mir/mod.rs @@ -1,5 +1,4 @@ use crate::traits::*; -use rustc_errors::ErrorGuaranteed; use rustc_middle::mir; use rustc_middle::mir::interpret::ErrorHandled; use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt, TyAndLayout}; @@ -191,7 +190,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( all_consts_ok = false; match err { // errored or at least linted - ErrorHandled::Reported(ErrorGuaranteed) | ErrorHandled::Linted => {} + ErrorHandled::Reported(_) | ErrorHandled::Linted => {} ErrorHandled::TooGeneric => { span_bug!(const_.span, "codgen encountered polymorphic constant: {:?}", err) } |
