Integer-like casts and integer numeric intrinsics from the pinned
rustc_const_eval::interpret::{cast,intrinsics} sources. The caller supplies
the compiler-resolved layouts. This module does not represent floating point,
raw/function pointers, or pointer provenance, so those casts cannot be routed
through these operations.
- integer (type : IntegerType) : IntegerCastSource
- boolean : IntegerCastSource
- character : IntegerCastSource
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq (Miri.Interpreter.IntegerCastSource.integer type) Miri.Interpreter.IntegerCastSource.boolean = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq (Miri.Interpreter.IntegerCastSource.integer type) Miri.Interpreter.IntegerCastSource.character = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq Miri.Interpreter.IntegerCastSource.boolean (Miri.Interpreter.IntegerCastSource.integer type) = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq Miri.Interpreter.IntegerCastSource.boolean Miri.Interpreter.IntegerCastSource.boolean = isTrue ⋯
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq Miri.Interpreter.IntegerCastSource.character (Miri.Interpreter.IntegerCastSource.integer type) = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastSource.decEq Miri.Interpreter.IntegerCastSource.character Miri.Interpreter.IntegerCastSource.character = isTrue ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- integer (type : IntegerType) : IntegerCastTarget
- character : IntegerCastTarget
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.instDecidableEqIntegerCastTarget.decEq (Miri.Interpreter.IntegerCastTarget.integer type) Miri.Interpreter.IntegerCastTarget.character = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastTarget.decEq Miri.Interpreter.IntegerCastTarget.character (Miri.Interpreter.IntegerCastTarget.integer type) = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastTarget.decEq Miri.Interpreter.IntegerCastTarget.character Miri.Interpreter.IntegerCastTarget.character = isTrue ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- scalar (reason : Memory.ScalarIntError) : IntegerCastError
- integerToCharTryFromPanicked (value : Nat) : IntegerCastError
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.instDecidableEqIntegerCastError.decEq (Miri.Interpreter.IntegerCastError.scalar a) (Miri.Interpreter.IntegerCastError.scalar b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastError.decEq (Miri.Interpreter.IntegerCastError.scalar reason) (Miri.Interpreter.IntegerCastError.integerToCharTryFromPanicked value) = isFalse ⋯
- Miri.Interpreter.instDecidableEqIntegerCastError.decEq (Miri.Interpreter.IntegerCastError.integerToCharTryFromPanicked value) (Miri.Interpreter.IntegerCastError.scalar reason) = isFalse ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Pinned cast_from_int_like behavior for integer, bool, and char inputs.
Signed integer sources are sign-extended to the source's u128 intermediate
before destination truncation. The char target follows u8::try_from(v).unwrap()
and records that unwrap's panic when conversion fails.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- ctpop : IntegerIntrinsic
- cttz : IntegerIntrinsic
- cttzNonzero : IntegerIntrinsic
- ctlz : IntegerIntrinsic
- ctlzNonzero : IntegerIntrinsic
- bswap : IntegerIntrinsic
- bitreverse : IntegerIntrinsic
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- scalar (reason : Memory.ScalarIntError) : IntegerIntrinsicError
- undefinedBehaviorOnZero (intrinsic : IntegerIntrinsic) : IntegerIntrinsicError
- layoutMismatch (input output : IntegerType) : IntegerIntrinsicError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
The pinned numeric_intrinsic branches. Counting ignores signedness and
uses the input width; byte swap and bit reversal require matching layouts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
- integerOperation (reason : IntegerOpError) : IntegerArithmeticIntrinsicError
- scalar (reason : Memory.ScalarIntError) : IntegerArithmeticIntrinsicError
- exactDivisionHasRemainder (remainder : Memory.ScalarInt) : IntegerArithmeticIntrinsicError
- unexpectedOverflowResult (result : IntegerResult) : IntegerArithmeticIntrinsicError
- unexpectedDivisionResult (result : IntegerResult) : IntegerArithmeticIntrinsicError
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- add : IntegerSaturatingOp
- sub : IntegerSaturatingOp
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Pinned saturating_arith: use the source overflowing operation, then
select the signed bound using the first operand's sign or the unsigned bound
from the operation direction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pinned exact_div: the ordinary remainder operation supplies division by
zero and signed MIN / -1 UB checks; a nonzero remainder is the intrinsic's own
UB branch; only then is ordinary division evaluated.
Equations
- One or more equations did not get rendered due to their size.