From a37bd8c376d4963c98f67c3c2fadcd3a8dcb8242 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 5 Nov 2019 21:36:44 +0700 Subject: [PATCH 1/3] build: avoid timing out in Travis --- ci/integration-tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/integration-tests.sh b/ci/integration-tests.sh index 6d33224a59b8..f6540769bb03 100755 --- a/ci/integration-tests.sh +++ b/ci/integration-tests.sh @@ -18,6 +18,8 @@ cd checkout # run clippy on a project, try to be verbose and trigger as many warnings # as possible for greater coverage +# NOTE: we use `tee` to print any warnings and errors to stdout +# to avoid build timeout in Travis RUST_BACKTRACE=full \ cargo clippy \ --all-targets \ @@ -26,10 +28,9 @@ cargo clippy \ --cap-lints warn \ -W clippy::pedantic \ -W clippy::nursery \ - > clippy_output 2>&1 || true + 2>&1 | tee clippy_output cargo uninstall clippy -cat clippy_output if grep -q "internal compiler error\|query stack during panic\|E0463" clippy_output; then exit 1 From 98313bd83aad7de8dc3cc9d18072923c12eb9ce6 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 5 Nov 2019 21:51:56 +0700 Subject: [PATCH 2/3] chore: remove unnecessary parentheses around type --- clippy_lints/src/mutex_atomic.rs | 2 +- clippy_lints/src/utils/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/mutex_atomic.rs b/clippy_lints/src/mutex_atomic.rs index d4194b0ca413..a8c953b880b8 100644 --- a/clippy_lints/src/mutex_atomic.rs +++ b/clippy_lints/src/mutex_atomic.rs @@ -77,7 +77,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Mutex { } } -fn get_atomic_name(ty: Ty<'_>) -> Option<(&'static str)> { +fn get_atomic_name(ty: Ty<'_>) -> Option<&'static str> { match ty.kind { ty::Bool => Some("AtomicBool"), ty::Uint(_) => Some("AtomicUsize"), diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 5729c8c2967a..bf46a9a8b822 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -239,7 +239,7 @@ pub fn match_path_ast(path: &ast::Path, segments: &[&str]) -> bool { } /// Gets the definition associated to a path. -pub fn path_to_res(cx: &LateContext<'_, '_>, path: &[&str]) -> Option<(def::Res)> { +pub fn path_to_res(cx: &LateContext<'_, '_>, path: &[&str]) -> Option { let crates = cx.tcx.crates(); let krate = crates .iter() From b8c2cb17e6136e45d61802dc16e33fb5d2427e24 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 4 Nov 2019 11:40:06 -0800 Subject: [PATCH 3/3] Turn off stdsimd integration test --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 7be9174843b0..6ab711b723b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,6 +90,7 @@ matrix: allow_failures: - os: windows env: CARGO_INCREMENTAL=0 OS_WINDOWS=true + - env: INTEGRATION=rust-lang-nursery/stdsimd before_script: - |