Documentation

Miri.Interpreter.IntegerCast

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.

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
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          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
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              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

                    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
                      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
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              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.
                                Instances For