difftreelog
fix use push_stack_frame in public macroses
in: master
2 files changed
crates/jrsonnet-evaluator/src/function.rsdiffbeforeafterboth146 ($ctx: expr, $fn_name: expr, $args: expr, $total_args: expr, [146 ($ctx: expr, $fn_name: expr, $args: expr, $total_args: expr, [147 $($id: expr, $name: ident: $ty: expr $(=>$match: path)?);+ $(;)?147 $($id: expr, $name: ident: $ty: expr $(=>$match: path)?);+ $(;)?148 ], $handler:block) => {{148 ], $handler:block) => {{149 use $crate::{error::Error::*, throw, evaluate, push, typed::CheckType};149 use $crate::{error::Error::*, throw, evaluate, push_stack_frame, typed::CheckType};150150151 let args = $args;151 let args = $args;152 if args.len() > $total_args {152 if args.len() > $total_args {162 throw!(IntrinsicArgumentReorderingIsNotSupportedYet);162 throw!(IntrinsicArgumentReorderingIsNotSupportedYet);163 }163 }164 }164 }165 let $name = push(None, || format!("evaluating argument"), || {165 let $name = push_stack_frame(None, || format!("evaluating argument"), || {166 let value = evaluate($ctx.clone(), &$name.1)?;166 let value = evaluate($ctx.clone(), &$name.1)?;167 $ty.check(&value)?;167 $ty.check(&value)?;168 Ok(value)168 Ok(value)crates/jrsonnet-evaluator/src/typed.rsdiffbeforeafterboth11#[macro_export]11#[macro_export]12macro_rules! unwrap_type {12macro_rules! unwrap_type {13 ($desc: expr, $value: expr, $typ: expr => $match: path) => {{13 ($desc: expr, $value: expr, $typ: expr => $match: path) => {{14 use $crate::{push, typed::CheckType};14 use $crate::{push_stack_frame, typed::CheckType};15 push(None, $desc, || Ok($typ.check(&$value)?))?;15 push_stack_frame(None, $desc, || Ok($typ.check(&$value)?))?;16 match $value {16 match $value {17 $match(v) => v,17 $match(v) => v,18 _ => unreachable!(),18 _ => unreachable!(),