diff options
| author | Ralf Jung <post@ralfj.de> | 2018-11-12 10:32:23 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-11-15 09:58:09 +0100 |
| commit | ffb6ba082897db55f7ab4e576175b144597aa38f (patch) | |
| tree | 9adb1d3420bb1e392ed3d3d648cb71362c6ded99 /src/librustc/mir/interpret | |
| parent | 4ec0ba9545f7c848aafc0bc1b8762507395edd41 (diff) | |
| download | rust-ffb6ba082897db55f7ab4e576175b144597aa38f.tar.gz rust-ffb6ba082897db55f7ab4e576175b144597aa38f.zip | |
validation: better error when the enum discriminant is Undef
Diffstat (limited to 'src/librustc/mir/interpret')
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index f28aa41ed42..c51a655418c 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -15,7 +15,7 @@ use ty::{Ty, layout}; use ty::layout::{Size, Align, LayoutError}; use rustc_target::spec::abi::Abi; -use super::{Pointer, Scalar}; +use super::{Pointer, ScalarMaybeUndef}; use backtrace::Backtrace; @@ -240,7 +240,7 @@ pub enum EvalErrorKind<'tcx, O> { InvalidMemoryAccess, InvalidFunctionPointer, InvalidBool, - InvalidDiscriminant(Scalar), + InvalidDiscriminant(ScalarMaybeUndef), PointerOutOfBounds { ptr: Pointer, access: bool, |
