Skip to content

Commit

Permalink
Use explicit re-export of serde_derive to give rustc more info
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Noratrieb committed Mar 14, 2023
1 parent 2ba4067 commit f42b258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serde/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f42b258

Please sign in to comment.