From 91ec1c290f73777a49d200c880a3e87d86067a94 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 27 Jul 2023 19:02:09 -0700 Subject: [PATCH] Enforce question mark not used in serde crate yet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Question mark regresses compile time by 6.5–7.5%. --- serde/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/serde/src/lib.rs b/serde/src/lib.rs index 5473f822..10461f46 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -149,6 +149,8 @@ must_use_candidate, ) )] +// Restrictions +#![cfg_attr(feature = "cargo-clippy", deny(question_mark_used))] // Rustc lints. #![deny(missing_docs, unused_imports)]