Skip to content

Commit f03edfd

Browse files
committed
Merge commit '4911ab124c481430672a3833b37075e6435ec34d' into clippyup
1 parent f00b6ac commit f03edfd

File tree

116 files changed

+3201
-1049
lines changed

Some content is hidden

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

116 files changed

+3201
-1049
lines changed

Diff for: .github/workflows/clippy.yml

+5-29
Original file line numberDiff line numberDiff line change
@@ -35,29 +35,11 @@ jobs:
3535
with:
3636
github_token: "${{ secrets.github_token }}"
3737

38-
- name: rust-toolchain
39-
uses: actions-rs/[email protected]
40-
with:
41-
toolchain: nightly
42-
target: x86_64-unknown-linux-gnu
43-
profile: minimal
44-
4538
- name: Checkout
4639
uses: actions/[email protected]
4740

48-
- name: Run cargo update
49-
run: cargo update
50-
51-
- name: Cache cargo dir
52-
uses: actions/cache@v2
53-
with:
54-
path: ~/.cargo
55-
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
56-
restore-keys: |
57-
${{ runner.os }}-x86_64-unknown-linux-gnu
58-
59-
- name: Master Toolchain Setup
60-
run: bash setup-toolchain.sh
41+
- name: Install toolchain
42+
run: rustup show active-toolchain
6143

6244
# Run
6345
- name: Set LD_LIBRARY_PATH (Linux)
@@ -66,13 +48,13 @@ jobs:
6648
echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
6749
6850
- name: Build
69-
run: cargo build --features deny-warnings
51+
run: cargo build --features deny-warnings,internal-lints
7052

7153
- name: Test
72-
run: cargo test --features deny-warnings
54+
run: cargo test --features deny-warnings,internal-lints
7355

7456
- name: Test clippy_lints
75-
run: cargo test --features deny-warnings
57+
run: cargo test --features deny-warnings,internal-lints
7658
working-directory: clippy_lints
7759

7860
- name: Test rustc_tools_util
@@ -98,9 +80,3 @@ jobs:
9880
cargo dev new_lint --name new_late_pass --pass late
9981
cargo check
10082
git reset --hard HEAD
101-
102-
# Cleanup
103-
- name: Run cargo-cache --autoclean
104-
run: |
105-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
106-
cargo cache

Diff for: .github/workflows/clippy_bors.yml

+13-84
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
2424
with:
2525
github_token: "${{ secrets.github_token }}"
26+
2627
- name: Checkout
2728
uses: actions/[email protected]
2829
with:
@@ -84,31 +85,11 @@ jobs:
8485
sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
8586
if: matrix.host == 'i686-unknown-linux-gnu'
8687

87-
- name: rust-toolchain
88-
uses: actions-rs/[email protected]
89-
with:
90-
toolchain: nightly
91-
target: ${{ matrix.host }}
92-
profile: minimal
93-
9488
- name: Checkout
9589
uses: actions/[email protected]
9690

97-
- name: Run cargo update
98-
run: cargo update
99-
100-
- name: Cache cargo dir
101-
uses: actions/cache@v2
102-
with:
103-
path: ~/.cargo
104-
key: ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
105-
restore-keys: |
106-
${{ runner.os }}-${{ matrix.host }}
107-
108-
- name: Master Toolchain Setup
109-
run: bash setup-toolchain.sh
110-
env:
111-
HOST_TOOLCHAIN: ${{ matrix.host }}
91+
- name: Install toolchain
92+
run: rustup show active-toolchain
11293

11394
# Run
11495
- name: Set LD_LIBRARY_PATH (Linux)
@@ -128,13 +109,13 @@ jobs:
128109
SYSROOT=$(rustc --print sysroot)
129110
echo "$SYSROOT/bin" >> $GITHUB_PATH
130111
131-
- name: Build with internal lints
112+
- name: Build
132113
run: cargo build --features deny-warnings,internal-lints
133114

134-
- name: Test with internal lints
115+
- name: Test
135116
run: cargo test --features deny-warnings,internal-lints
136117

137-
- name: Test clippy_lints with internal lints
118+
- name: Test clippy_lints
138119
run: cargo test --features deny-warnings,internal-lints
139120
working-directory: clippy_lints
140121

@@ -155,12 +136,6 @@ jobs:
155136
env:
156137
OS: ${{ runner.os }}
157138

158-
# Cleanup
159-
- name: Run cargo-cache --autoclean
160-
run: |
161-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
162-
cargo cache
163-
164139
integration_build:
165140
needs: changelog
166141
runs-on: ubuntu-latest
@@ -171,29 +146,11 @@ jobs:
171146
with:
172147
github_token: "${{ secrets.github_token }}"
173148

174-
- name: rust-toolchain
175-
uses: actions-rs/[email protected]
176-
with:
177-
toolchain: nightly
178-
target: x86_64-unknown-linux-gnu
179-
profile: minimal
180-
181149
- name: Checkout
182150
uses: actions/[email protected]
183151

184-
- name: Run cargo update
185-
run: cargo update
186-
187-
- name: Cache cargo dir
188-
uses: actions/cache@v2
189-
with:
190-
path: ~/.cargo
191-
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
192-
restore-keys: |
193-
${{ runner.os }}-x86_64-unknown-linux-gnu
194-
195-
- name: Master Toolchain Setup
196-
run: bash setup-toolchain.sh
152+
- name: Install toolchain
153+
run: rustup show active-toolchain
197154

198155
# Run
199156
- name: Build Integration Test
@@ -214,11 +171,6 @@ jobs:
214171
name: target
215172
path: target
216173

217-
# Cleanup
218-
- name: Run cargo-cache --autoclean
219-
run: |
220-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
221-
cargo cache
222174
integration:
223175
needs: integration_build
224176
strategy:
@@ -252,29 +204,11 @@ jobs:
252204
with:
253205
github_token: "${{ secrets.github_token }}"
254206

255-
- name: rust-toolchain
256-
uses: actions-rs/[email protected]
257-
with:
258-
toolchain: nightly
259-
target: x86_64-unknown-linux-gnu
260-
profile: minimal
261-
262207
- name: Checkout
263208
uses: actions/[email protected]
264209

265-
- name: Run cargo update
266-
run: cargo update
267-
268-
- name: Cache cargo dir
269-
uses: actions/cache@v2
270-
with:
271-
path: ~/.cargo
272-
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
273-
restore-keys: |
274-
${{ runner.os }}-x86_64-unknown-linux-gnu
275-
276-
- name: Master Toolchain Setup
277-
run: bash setup-toolchain.sh
210+
- name: Install toolchain
211+
run: rustup show active-toolchain
278212

279213
# Download
280214
- name: Download target dir
@@ -288,16 +222,11 @@ jobs:
288222

289223
# Run
290224
- name: Test ${{ matrix.integration }}
291-
run: $CARGO_TARGET_DIR/debug/integration
225+
run: |
226+
RUSTUP_TOOLCHAIN="$(rustup show active-toolchain | grep -o -E "nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}")" \
227+
$CARGO_TARGET_DIR/debug/integration
292228
env:
293229
INTEGRATION: ${{ matrix.integration }}
294-
RUSTUP_TOOLCHAIN: master
295-
296-
# Cleanup
297-
- name: Run cargo-cache --autoclean
298-
run: |
299-
cargo +nightly install cargo-cache --no-default-features --features ci-autoclean cargo-cache
300-
cargo cache
301230

302231
# These jobs doesn't actually test anything, but they're only used to tell
303232
# bors the build completed, as there is no practical way to detect when a

Diff for: .github/workflows/clippy_dev.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ jobs:
2222

2323
steps:
2424
# Setup
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
28+
- name: remove toolchain file
29+
run: rm rust-toolchain
30+
2531
- name: rust-toolchain
2632
uses: actions-rs/[email protected]
2733
with:
2834
toolchain: nightly
2935
target: x86_64-unknown-linux-gnu
3036
profile: minimal
3137
components: rustfmt
32-
33-
- name: Checkout
34-
uses: actions/[email protected]
38+
default: true
3539

3640
# Run
3741
- name: Build

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,7 @@ Released 2018-09-13
20062006
[`possible_missing_comma`]: https://rust-lang.github.io/rust-clippy/master/index.html#possible_missing_comma
20072007
[`precedence`]: https://rust-lang.github.io/rust-clippy/master/index.html#precedence
20082008
[`print_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_literal
2009+
[`print_stderr`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_stderr
20092010
[`print_stdout`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_stdout
20102011
[`print_with_newline`]: https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline
20112012
[`println_empty_string`]: https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string
@@ -2024,6 +2025,7 @@ Released 2018-09-13
20242025
[`redundant_closure`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
20252026
[`redundant_closure_call`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_call
20262027
[`redundant_closure_for_method_calls`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
2028+
[`redundant_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_else
20272029
[`redundant_field_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
20282030
[`redundant_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
20292031
[`redundant_pattern_matching`]: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
@@ -2169,5 +2171,6 @@ Released 2018-09-13
21692171
[`zero_divided_by_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_divided_by_zero
21702172
[`zero_prefixed_literal`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal
21712173
[`zero_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr
2174+
[`zero_sized_map_values`]: https://rust-lang.github.io/rust-clippy/master/index.html#zero_sized_map_values
21722175
[`zst_offset`]: https://rust-lang.github.io/rust-clippy/master/index.html#zst_offset
21732176
<!-- end autogenerated links to lint list -->

0 commit comments

Comments
 (0)