+42
−1
Loading
In order to copy the behavior rust currently follows for basic arithmetic operations and panic if the result of an addition or subtraction results in a value that would violate the invariants of Instant, but only if the kernel has overflow checking for rust enabled. Signed-off-by:Lyude Paul <lyude@redhat.com> Reviewed-by:
Alice Ryhl <aliceryhl@google.com> Reviewed-by:
FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by:
Andreas Hindborg <a.hindborg@kernel.org> Reviewed-by:
Daniel Almeida <daniel.almeida@collabora.com> Link: https://lore.kernel.org/r/20250820203704.731588-2-lyude@redhat.com Signed-off-by:
Andreas Hindborg <a.hindborg@kernel.org>