From d6f01f3a6c16d2fc350c36fb704ef68277ef426e Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Mon, 3 Sep 2018 13:57:50 +1200 Subject: [PATCH] Make `Conf::default` available Fixes RLS --- clippy_lints/src/lib.rs | 2 +- clippy_lints/src/utils/conf.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index adc4f76fe..d0e8def27 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -171,7 +171,7 @@ pub mod write; pub mod zero_div_zero; // end lints modules, do not remove this comment, it’s used in `update_lints` -use crate::utils::conf::Conf; +pub use crate::utils::conf::Conf; mod reexport { crate use syntax::ast::{Name, NodeId}; diff --git a/clippy_lints/src/utils/conf.rs b/clippy_lints/src/utils/conf.rs index a7e73d85c..8ec889a9f 100644 --- a/clippy_lints/src/utils/conf.rs +++ b/clippy_lints/src/utils/conf.rs @@ -65,7 +65,7 @@ macro_rules! define_Conf { mod helpers { use serde_derive::Deserialize; /// Type used to store lint configuration. - #[derive(Deserialize)] + #[derive(Default, Deserialize)] #[serde(rename_all="kebab-case", deny_unknown_fields)] pub struct Conf { $(#[$doc] #[serde(default=$rust_name_str)] #[serde(with=$rust_name_str)]