mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 18:13:58 +02:00
mitigate additional debuginfo expansions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
576a783a6f
commit
8e7373c027
8 changed files with 13 additions and 6 deletions
|
@ -10,6 +10,7 @@ use crate::{Err, Error, Result, debug::type_name, err};
|
|||
|
||||
/// Checked arithmetic expression. Returns a Result<R, Error::Arithmetic>
|
||||
#[macro_export]
|
||||
#[collapse_debuginfo(yes)]
|
||||
macro_rules! checked {
|
||||
($($input:tt)+) => {
|
||||
$crate::utils::math::checked_ops!($($input)+)
|
||||
|
@ -22,6 +23,7 @@ macro_rules! checked {
|
|||
/// has no realistic expectation for error and no interest in cluttering the
|
||||
/// callsite with result handling from checked!.
|
||||
#[macro_export]
|
||||
#[collapse_debuginfo(yes)]
|
||||
macro_rules! expected {
|
||||
($msg:literal, $($input:tt)+) => {
|
||||
$crate::checked!($($input)+).expect($msg)
|
||||
|
@ -37,6 +39,7 @@ macro_rules! expected {
|
|||
/// regression analysis.
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[macro_export]
|
||||
#[collapse_debuginfo(yes)]
|
||||
macro_rules! validated {
|
||||
($($input:tt)+) => {
|
||||
//#[allow(clippy::arithmetic_side_effects)] {
|
||||
|
@ -53,6 +56,7 @@ macro_rules! validated {
|
|||
/// the expression is obviously safe. The check is elided in release-mode.
|
||||
#[cfg(debug_assertions)]
|
||||
#[macro_export]
|
||||
#[collapse_debuginfo(yes)]
|
||||
macro_rules! validated {
|
||||
($($input:tt)+) => { $crate::expected!($($input)+) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue