Skip to content

Commit ab2dd0d

Browse files
committed
submodules: update clippy from 7b8e829 to 7a943a9
Changes: ```` Normalize custom ICE test Rustup to rust-lang/rust#64736 Use assert_crate_local for a more explicit error Rustup to rust-lang/rust#66789 account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint build(tests/fmt): use shared target dir chore: fix and split some ui tests on 32bit system build: set up build job for i686 targets remove needless my_lint ui test git quiet deploy: cd to out/ before adding files to git Less needless_doctest_main false positives fmt Feed the dog Use rustc_env instead of exec_env for test Make triggering this lint less likely 📎 Use exec_env to set backtrace level and normalize output Update custom ICE function with latest rustc Use Clippy version in ICE message Add custom ICE message that points to Clippy repo Fix master deployment Run update_lints Add projections check to EUV for escape analysis Use infer_ctxt Move use_self to nursery Use `println!` on success instead of `eprintln!` Revert "Disable chalk integration test. Output too large" Remove the old integration-tests.sh script Use rust implementation for integration tests in CI Rust implementation of integration test Don't error on clippy.toml of dependencies Fix categorizations Fix arguments on ExprUseVisitor::new euv moved from middle to typeck cmt_ -> Place build: check if RTIM is not installed make use of Result::map_or trigger string_lit_as_bytes when literal has escapes Remove negative float literal checks. Enable deny-warnings feature everywhere in CI Remove unused debugging feature implemented `as_conversions` lint fixing a typo [comparison_chain] rust-lang#4827 Check `core::cmp::Ord` is implemented add a good example for the approx_const lint Add suggested good cases in docs for lifetimes lint ````
1 parent ee1aa9a commit ab2dd0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1189
-347
lines changed

.github/deploy.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ if git diff --exit-code --quiet; then
6060
echo "No changes to the output on this push; exiting."
6161
exit 0
6262
fi
63+
cd -
6364

6465
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
6566
ENCRYPTION_LABEL=e3a2d77100be
@@ -72,6 +73,7 @@ chmod 600 .github/deploy_key
7273
eval "$(ssh-agent -s)"
7374
ssh-add .github/deploy_key
7475

76+
cd out
7577
git add .
7678
git commit -m "Automatic deploy to GitHub Pages: ${SHA}"
7779

.travis.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
dist: xenial
22
language: bash
3+
git:
4+
depth: 1
5+
quiet: true
36

47
branches:
58
# Don't build these branches
@@ -22,6 +25,7 @@ env:
2225
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
2326

2427
before_install:
28+
- export CARGO_TARGET_DIR="$TRAVIS_BUILD_DIR/target"
2529
- curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
2630
- export PATH="$HOME/.cargo/bin:$PATH"
2731
install:
@@ -48,6 +52,15 @@ matrix:
4852
include:
4953
# Builds that are executed for every PR
5054
- os: linux
55+
# i686 toolchain could run on x86_64 system.
56+
- os: linux
57+
env: HOST_TOOLCHAIN=i686-unknown-linux-gnu
58+
addons:
59+
apt:
60+
packages:
61+
- gcc-multilib
62+
- libssl-dev:i386 # openssl dev in Cargo.toml
63+
if: branch IN (auto, try)
5164
- os: windows
5265
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
5366

@@ -61,14 +74,12 @@ matrix:
6174
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
6275
- env: INTEGRATION=rust-lang/cargo
6376
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
64-
# FIXME: Output too large
65-
# - env: INTEGRATION=rust-lang-nursery/chalk
66-
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
77+
- env: INTEGRATION=rust-lang/chalk
78+
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
6779
- env: INTEGRATION=Geal/nom
6880
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
69-
# FIXME blocked on https://github.com/rust-lang/rust-clippy/issues/4727
70-
#- env: INTEGRATION=rust-lang/rustfmt
71-
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
81+
- env: INTEGRATION=rust-lang/rustfmt
82+
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
7283
- env: INTEGRATION=hyperium/hyper
7384
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
7485
- env: INTEGRATION=bluss/rust-itertools
@@ -116,7 +127,7 @@ before_script:
116127
SYSROOT=$(rustc --print sysroot)
117128
case "$TRAVIS_OS_NAME" in
118129
windows ) export PATH="${SYSROOT}/bin:${PATH}" ;;
119-
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib" ;;
130+
linux ) export LD_LIBRARY_PATH="${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" ;;
120131
osx )
121132
# See <https://github.com/nteract/nteract/issues/1523#issuecomment-301623519>
122133
sudo mkdir -p /usr/local/lib
@@ -127,7 +138,7 @@ before_script:
127138
script:
128139
- |
129140
if [[ -n ${INTEGRATION} ]]; then
130-
./ci/integration-tests.sh && sleep 5
141+
cargo test --test integration --features integration && sleep 5
131142
else
132143
./ci/base-tests.sh && sleep 5
133144
fi

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,7 @@ Released 2018-09-13
929929
[`absurd_extreme_comparisons`]: https://rust-lang.github.io/rust-clippy/master/index.html#absurd_extreme_comparisons
930930
[`almost_swapped`]: https://rust-lang.github.io/rust-clippy/master/index.html#almost_swapped
931931
[`approx_constant`]: https://rust-lang.github.io/rust-clippy/master/index.html#approx_constant
932+
[`as_conversions`]: https://rust-lang.github.io/rust-clippy/master/index.html#as_conversions
932933
[`assertions_on_constants`]: https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants
933934
[`assign_op_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
934935
[`assign_ops`]: https://rust-lang.github.io/rust-clippy/master/index.html#assign_ops

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ clippy_lints = { version = "0.0.212", path = "clippy_lints" }
3838
regex = "1"
3939
semver = "0.9"
4040
rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
41+
git2 = { version = "0.10", optional = true }
42+
tempfile = { version = "3.1.0", optional = true }
43+
lazy_static = "1.0"
4144

4245
[dev-dependencies]
4346
cargo_metadata = "0.9.0"
@@ -58,4 +61,4 @@ rustc_tools_util = { version = "0.2.0", path = "rustc_tools_util"}
5861

5962
[features]
6063
deny-warnings = []
61-
debugging = []
64+
integration = ["git2", "tempfile"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
88

9-
[There are 337 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
9+
[There are 338 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
1010

1111
We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
1212

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ install:
3737
build: false
3838

3939
build_script:
40-
- cargo build --features debugging
40+
- cargo build --features deny-warnings
4141

4242
test_script:
43-
- cargo test --features debugging
43+
- cargo test --features deny-warnings
4444

4545
notifications:
4646
- provider: Email

ci/base-tests.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
# for faster build, share target dir between subcrates
5-
CARGO_TARGET_DIR=$(pwd)/target/
6-
export CARGO_TARGET_DIR
7-
84
echo "Running clippy base tests"
95

106
PATH=$PATH:./node_modules/.bin
117
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
128
remark -f ./*.md -f doc/*.md > /dev/null
139
fi
1410
# build clippy in debug mode and run tests
15-
cargo build --features "debugging deny-warnings"
16-
cargo test --features "debugging deny-warnings"
11+
cargo build --features deny-warnings
12+
cargo test --features deny-warnings
1713

18-
(cd clippy_lints && cargo test)
19-
(cd rustc_tools_util && cargo test)
20-
(cd clippy_dev && cargo test)
14+
(cd clippy_lints && cargo test --features deny-warnings)
15+
(cd rustc_tools_util && cargo test --features deny-warnings)
16+
(cd clippy_dev && cargo test --features deny-warnings)
2117

2218
# make sure clippy can be called via ./path/to/cargo-clippy
2319
(

ci/integration-tests.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

clippy_dev/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ regex = "1"
1111
lazy_static = "1.0"
1212
shell-escape = "0.1"
1313
walkdir = "2"
14+
15+
[features]
16+
deny-warnings = []

clippy_dev/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
2+
13
use itertools::Itertools;
24
use lazy_static::lazy_static;
35
use regex::Regex;

0 commit comments

Comments
 (0)