From 76f9b3b4c9230284f9ed3dca7afe27d836415d0f Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 22 Oct 2019 11:15:12 +0200 Subject: [PATCH 1/4] Readd some PartialEq and Hash derives used by Clippy --- src/libsyntax/ast.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 8be7f4478fa09..51a62cd065843 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -1305,7 +1305,8 @@ impl MacroDef { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy)] +// Clippy uses Hash and PartialEq +#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq)] pub enum StrStyle { /// A regular string, like `"foo"`. Cooked, @@ -1327,7 +1328,8 @@ pub struct Lit { pub span: Span, } -#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy)] +// Clippy uses Hash and PartialEq +#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq)] pub enum LitIntType { Signed(IntTy), Unsigned(UintTy), @@ -1337,7 +1339,8 @@ pub enum LitIntType { /// Literal kind. /// /// E.g., `"foo"`, `42`, `12.34`, or `bool`. -#[derive(Clone, RustcEncodable, RustcDecodable, Debug)] +// Clippy uses Hash and PartialEq +#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Hash, PartialEq)] pub enum LitKind { /// A string literal (`"foo"`). Str(Symbol, StrStyle), From 6bc16ef3c7c2075e5eb9a6c643dbf4efbd10c495 Mon Sep 17 00:00:00 2001 From: flip1995 Date: Tue, 22 Oct 2019 11:24:18 +0200 Subject: [PATCH 2/4] Update Clippy --- src/tools/clippy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/clippy b/src/tools/clippy index cbedd97b3a580..e8d5a9e95c145 160000 --- a/src/tools/clippy +++ b/src/tools/clippy @@ -1 +1 @@ -Subproject commit cbedd97b3a58023eff365a2fa74700d06115144a +Subproject commit e8d5a9e95c145a3a9be89c582d8a6f88d4ea7037 From 7e0ef6e92e327e9d49b1f4a4202a308ad3936d36 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 23 Oct 2019 02:46:10 +0000 Subject: [PATCH 3/4] update compiletest --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b51095d429006..3f37a1b7eb091 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -556,9 +556,9 @@ dependencies = [ [[package]] name = "compiletest_rs" -version = "0.3.24" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "676a74b493d50ac33cacd83fd536597e6b52c0b46b9856f7b9c809d82fef4ac0" +checksum = "f75b10a18fb53549fdd090846eb01c7f8593914494d1faabc4d3005c436e417a" dependencies = [ "diff", "filetime", From 557cbd0fd5c783a69a259118ac578e4d575dc7a6 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Wed, 23 Oct 2019 03:49:42 +0000 Subject: [PATCH 4/4] Public some types for compiletest_rs --- src/libtest/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 179558e8f9a18..8c1e9f1722a26 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -34,8 +34,10 @@ pub use self::ColorConfig::*; pub use self::types::*; pub use self::types::TestName::*; -pub use self::options::{Options, ShouldPanic}; +pub use self::options::{ColorConfig, Options, OutputFormat, RunIgnored, ShouldPanic}; pub use self::bench::{Bencher, black_box}; +pub use self::console::run_tests_console; +pub use cli::TestOpts; // Module to be used by rustc to compile tests in libtest pub mod test { @@ -84,9 +86,8 @@ mod tests; use test_result::*; use time::TestExecTime; -use options::{RunStrategy, Concurrent, RunIgnored, ColorConfig}; +use options::{RunStrategy, Concurrent}; use event::{CompletedTest, TestEvent}; -use cli::TestOpts; use helpers::sink::Sink; use helpers::concurrency::get_concurrency; use helpers::exit_code::get_exit_code;