]> git.lizzy.rs Git - rust.git/commitdiff
Make `Conf::default` available
authorNick Cameron <ncameron@mozilla.com>
Mon, 3 Sep 2018 01:57:50 +0000 (13:57 +1200)
committerNick Cameron <ncameron@mozilla.com>
Mon, 3 Sep 2018 01:57:50 +0000 (13:57 +1200)
Fixes RLS

clippy_lints/src/lib.rs
clippy_lints/src/utils/conf.rs

index adc4f76fef94900be910a14ea2642242633d8bbf..d0e8def27868b315bb5e6fe138991fdcd8cc74f6 100644 (file)
@@ -171,7 +171,7 @@ macro_rules! declare_clippy_lint {
 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};
index a7e73d85cf0fee3ae829251f1b0f3ac0e21e1600..8ec889a9fb6b329cfbdda66bbeaa33849581260e 100644 (file)
@@ -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)]