diff options
| author | Albin Hedman <albin9604@gmail.com> | 2020-12-05 17:32:19 +0100 |
|---|---|---|
| committer | Albin Hedman <albin9604@gmail.com> | 2020-12-05 17:32:19 +0100 |
| commit | d366ed2730ed4a11df8a18f440c6874f7fa610f2 (patch) | |
| tree | adf66cfbc55c2be3c9550905f6b2c37929965a7a /compiler/rustc_mir/src/const_eval/error.rs | |
| parent | 4f9fd2a5d45a0ea0c49a3a78f8f1c8e091b9c604 (diff) | |
| download | rust-d366ed2730ed4a11df8a18f440c6874f7fa610f2.tar.gz rust-d366ed2730ed4a11df8a18f440c6874f7fa610f2.zip | |
abort() now takes a msg parameter
Diffstat (limited to 'compiler/rustc_mir/src/const_eval/error.rs')
| -rw-r--r-- | compiler/rustc_mir/src/const_eval/error.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_mir/src/const_eval/error.rs b/compiler/rustc_mir/src/const_eval/error.rs index 39358e03e75..345a3d7e79b 100644 --- a/compiler/rustc_mir/src/const_eval/error.rs +++ b/compiler/rustc_mir/src/const_eval/error.rs @@ -20,6 +20,7 @@ pub enum ConstEvalErrKind { ModifiedGlobal, AssertFailure(AssertKind<ConstInt>), Panic { msg: Symbol, line: u32, col: u32, file: Symbol }, + Abort(String), } // The errors become `MachineStop` with plain strings when being raised. @@ -46,6 +47,7 @@ impl fmt::Display for ConstEvalErrKind { Panic { msg, line, col, file } => { write!(f, "the evaluated program panicked at '{}', {}:{}:{}", msg, file, line, col) } + Abort(ref msg) => write!(f, "{}", msg) } } } |
