about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexey Shmalko <rasen.dubi@gmail.com>2019-05-03 22:19:24 +0300
committerAlexey Shmalko <rasen.dubi@gmail.com>2019-05-03 22:19:24 +0300
commit1937bf26268d88fabd52873a2bb0ef60e078422f (patch)
treef886da22cc9d1f498ec902b60fa1a4c9f161dc8a
parent3af1bdc4bcc502d576b1e836f99bae1eb29dbafd (diff)
Migrate tidy to rust 2018 edition
-rw-r--r--src/tools/tidy/Cargo.toml1
-rw-r--r--src/tools/tidy/src/deps.rs1
-rw-r--r--src/tools/tidy/src/features.rs2
-rw-r--r--src/tools/tidy/src/lib.rs7
-rw-r--r--src/tools/tidy/src/main.rs2
5 files changed, 3 insertions, 10 deletions
diff --git a/src/tools/tidy/Cargo.toml b/src/tools/tidy/Cargo.toml
index f5db2487618..433e9264dd1 100644
--- a/src/tools/tidy/Cargo.toml
+++ b/src/tools/tidy/Cargo.toml
@@ -2,6 +2,7 @@
 name = "tidy"
 version = "0.1.0"
 authors = ["Alex Crichton <alex@alexcrichton.com>"]
+edition = "2018"
 
 [dependencies]
 regex = "1"
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index 411961d70bf..e90737febd5 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -5,6 +5,7 @@ use std::fs;
 use std::path::Path;
 use std::process::Command;
 
+use serde_derive::Deserialize;
 use serde_json;
 
 const LICENSES: &[&str] = &[
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 3144df6dd4c..f9f3623679e 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -18,7 +18,7 @@ use std::path::Path;
 use regex::{Regex, escape};
 
 mod version;
-use self::version::Version;
+use version::Version;
 
 const FEATURE_GROUP_START_PREFIX: &str = "// feature-group-start";
 const FEATURE_GROUP_END_PREFIX: &str = "// feature-group-end";
diff --git a/src/tools/tidy/src/lib.rs b/src/tools/tidy/src/lib.rs
index 30080452edc..d06c99725bc 100644
--- a/src/tools/tidy/src/lib.rs
+++ b/src/tools/tidy/src/lib.rs
@@ -3,13 +3,6 @@
 //! This library contains the tidy lints and exposes it
 //! to be used by tools.
 
-#![deny(rust_2018_idioms)]
-
-extern crate regex;
-extern crate serde_json;
-#[macro_use]
-extern crate serde_derive;
-
 use std::fs;
 
 use std::path::Path;
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs
index 66224038266..eef37190438 100644
--- a/src/tools/tidy/src/main.rs
+++ b/src/tools/tidy/src/main.rs
@@ -4,10 +4,8 @@
 //! etc. This is run by default on `make check` and as part of the auto
 //! builders.
 
-#![deny(rust_2018_idioms)]
 #![deny(warnings)]
 
-extern crate tidy;
 use tidy::*;
 
 use std::process;