Merge pull request #3114 from nrc/pub-conf

Make `Conf::default` available
This commit is contained in:
Manish Goregaokar 2018-09-03 07:36:58 +05:30 committed by GitHub
commit 6141339f88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -171,7 +171,7 @@ pub mod write;
pub mod zero_div_zero; pub mod zero_div_zero;
// end lints modules, do not remove this comment, its used in `update_lints` // end lints modules, do not remove this comment, its used in `update_lints`
use crate::utils::conf::Conf; pub use crate::utils::conf::Conf;
mod reexport { mod reexport {
crate use syntax::ast::{Name, NodeId}; crate use syntax::ast::{Name, NodeId};

View file

@ -65,7 +65,7 @@ macro_rules! define_Conf {
mod helpers { mod helpers {
use serde_derive::Deserialize; use serde_derive::Deserialize;
/// Type used to store lint configuration. /// Type used to store lint configuration.
#[derive(Deserialize)] #[derive(Default, Deserialize)]
#[serde(rename_all="kebab-case", deny_unknown_fields)] #[serde(rename_all="kebab-case", deny_unknown_fields)]
pub struct Conf { pub struct Conf {
$(#[$doc] #[serde(default=$rust_name_str)] #[serde(with=$rust_name_str)] $(#[$doc] #[serde(default=$rust_name_str)] #[serde(with=$rust_name_str)]