From b6c7ce8ec31e352e74a415950ac55557ebfe1a2c Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 13 Sep 2025 10:21:32 -0700 Subject: [PATCH] Specify the cfg in which 'tri!' is used --- serde/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 6f53ed11..a8e9f96b 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -221,7 +221,7 @@ mod lib { // performed implicitly by the `?` operator or the standard library's `try!` // macro. This simplified macro gives a 5.5% improvement in compile time // compared to standard `try!`, and 9% improvement compared to `?`. -#[allow(unused_macros)] +#[cfg(not(no_serde_derive))] macro_rules! tri { ($expr:expr) => { match $expr {