interactive_clap_derive/debug.rs
1#[cfg(feature = "introspect")]
2macro_rules! dbg_cond {
3 ($val:expr) => {
4 dbg!($val)
5 };
6}
7
8/// this macro under `introspect` feature can be used to debug how derive proc macros
9/// ([`crate::InteractiveClap`], [`crate::ToCliArgs`]) work
10///
11/// ```bash
12/// # interactive-clap-derive folder
13/// cargo test test_doc_comments_propagate --features introspect -- --nocapture
14/// # from repo root
15/// cargo run --example struct_with_subargs --features interactive-clap-derive/introspect
16/// ```
17#[cfg(not(feature = "introspect"))]
18macro_rules! dbg_cond {
19 ($val:expr) => {
20 #[allow(unused)]
21 #[allow(clippy::no_effect)]
22 $val
23 };
24}