diff options
| author | Ralf Jung <post@ralfj.de> | 2020-03-22 22:54:41 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2020-03-22 22:54:41 +0100 |
| commit | 29df39ba8cc8a3591cf5c9c098f37243b783ca3e (patch) | |
| tree | e5fa45f90e234f9415f7263382756d54c6138700 /src | |
| parent | d1e81ef234ff5c2e0e3a69cb4e8e5f5b0fe1fd83 (diff) | |
| download | rust-29df39ba8cc8a3591cf5c9c098f37243b783ca3e.tar.gz rust-29df39ba8cc8a3591cf5c9c098f37243b783ca3e.zip | |
remove UbExperimental variant
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/mir/interpret/error.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/librustc/mir/interpret/error.rs b/src/librustc/mir/interpret/error.rs index ff107a5f1e2..f665881ae4c 100644 --- a/src/librustc/mir/interpret/error.rs +++ b/src/librustc/mir/interpret/error.rs @@ -319,8 +319,6 @@ impl fmt::Debug for InvalidProgramInfo<'_> { pub enum UndefinedBehaviorInfo { /// Free-form case. Only for errors that are never caught! Ub(String), - /// Free-form case for experimental UB. Only for errors that are never caught! - UbExperimental(String), /// Unreachable code was executed. Unreachable, /// An enum discriminant was set to a value which was outside the range of valid values. @@ -381,7 +379,7 @@ impl fmt::Debug for UndefinedBehaviorInfo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { use UndefinedBehaviorInfo::*; match self { - Ub(msg) | UbExperimental(msg) => write!(f, "{}", msg), + Ub(msg) => write!(f, "{}", msg), Unreachable => write!(f, "entering unreachable code"), InvalidDiscriminant(val) => write!(f, "encountering invalid enum discriminant {}", val), BoundsCheckFailed { ref len, ref index } => write!( @@ -563,8 +561,7 @@ impl InterpError<'_> { InterpError::MachineStop(_) | InterpError::Unsupported(UnsupportedOpInfo::Unsupported(_)) | InterpError::UndefinedBehavior(UndefinedBehaviorInfo::ValidationFailure(_)) - | InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_)) - | InterpError::UndefinedBehavior(UndefinedBehaviorInfo::UbExperimental(_)) => true, + | InterpError::UndefinedBehavior(UndefinedBehaviorInfo::Ub(_)) => true, _ => false, } } |
