Remove import of serde
This commit is contained in:
@@ -24,9 +24,6 @@ use rustc_plugin;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate matches as matches_macro;
|
extern crate matches as matches_macro;
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate serde_derive;
|
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use std::io::Read;
|
|||||||
use syntax::{ast, codemap};
|
use syntax::{ast, codemap};
|
||||||
use toml;
|
use toml;
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
/// Get the configuration file from arguments.
|
/// Get the configuration file from arguments.
|
||||||
pub fn file_from_args(
|
pub fn file_from_args(
|
||||||
args: &[codemap::Spanned<ast::NestedMetaItemKind>],
|
args: &[codemap::Spanned<ast::NestedMetaItemKind>],
|
||||||
@@ -86,10 +85,10 @@ macro_rules! define_Conf {
|
|||||||
//
|
//
|
||||||
#[allow(rust_2018_idioms)]
|
#[allow(rust_2018_idioms)]
|
||||||
mod helpers {
|
mod helpers {
|
||||||
|
use serde_derive::Deserialize;
|
||||||
/// Type used to store lint configuration.
|
/// Type used to store lint configuration.
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
#[serde(rename_all="kebab-case")]
|
#[serde(rename_all="kebab-case", deny_unknown_fields)]
|
||||||
#[serde(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)]
|
||||||
pub $rust_name: define_Conf!(TY $($ty)+),)+
|
pub $rust_name: define_Conf!(TY $($ty)+),)+
|
||||||
|
|||||||
Reference in New Issue
Block a user