[−][src]Enum rustc_middle::mir::interpret::error::UndefinedBehaviorInfo
Error information for when the program caused Undefined Behavior.
Variants
Ub(String)Free-form case. Only for errors that are never caught!
Unreachable code was executed.
A slice/array index projection went out-of-bounds.
Something was divided by 0 (x / 0).
Something was "remainded" by 0 (x % 0).
Overflowing inbounds pointer arithmetic.
InvalidMeta(&'static str)Invalid metadata in a wide pointer (using str to avoid allocations).
InvalidDropFn(FnSig<'tcx>)Invalid drop function in vtable.
UnterminatedCString(Pointer)Reading a C string that does not end within its allocation.
PointerUseAfterFree(AllocId)Dereferencing a dangling pointer after it got freed.
Used a pointer outside the bounds it is valid for.
Fields of PointerOutOfBounds
DanglingIntPointer(u64, CheckInAllocMsg)Using an integer as a pointer in the wrong way.
Used a pointer with bad alignment.
WriteToReadOnly(AllocId)Writing to read-only memory.
DerefFunctionPointer(AllocId)ValidationFailure(String)The value validity check found a problem.
Should only be thrown by validity.rs and always point out which part of the value
is the problem.
InvalidBool(u8)Using a non-boolean u8 as bool.
InvalidChar(u32)Using a non-character u32 as character.
InvalidTag(Scalar)The tag of an enum does not encode an actual discriminant.
InvalidFunctionPointer(Pointer)Using a pointer-not-to-a-function as function pointer.
InvalidStr(Utf8Error)Using a string that is not valid UTF-8,
InvalidUninitBytes(Option<Box<UninitBytesAccess>>)Using uninitialized data where it is not allowed.
Working with a local that is not currently live.
Data size is not equal to target size.
Trait Implementations
impl<'_> Display for UndefinedBehaviorInfo<'_>[src]
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for UndefinedBehaviorInfo<'tcx>
impl<'tcx> !Send for UndefinedBehaviorInfo<'tcx>
impl<'tcx> !Sync for UndefinedBehaviorInfo<'tcx>
impl<'tcx> Unpin for UndefinedBehaviorInfo<'tcx>
impl<'tcx> !UnwindSafe for UndefinedBehaviorInfo<'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MaybeResult<T> for T[src]
type Error = !
pub fn from(Result<T, <T as MaybeResult<T>>::Error>) -> T[src]
pub fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.