From f42b2581da2bdbb81713a93d3b7e581b81e4332e Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 14 Mar 2023 08:11:38 +0100 Subject: [PATCH] Use explicit re-export of `serde_derive` to give rustc more info rustc will start looking behind `#[cfg(FALSE)]` items to start giving better diagnostics. By using an explicit re-export instead of a glob export, we tell rustc that `Deserialize` and `Serialize` exist here. --- 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 da34b2890..489c07754 100644 --- a/serde/src/lib.rs +++ b/serde/src/lib.rs @@ -340,7 +340,7 @@ mod std_error; extern crate serde_derive; #[cfg(feature = "serde_derive")] #[doc(hidden)] -pub use serde_derive::*; +pub use serde_derive::{Deserialize, Serialize}; #[cfg(all(not(no_serde_derive), any(feature = "std", feature = "alloc")))] mod actually_private {