Skip to content

Commit fb943fb

Browse files
author
kai.giebeler
committed
Merge remote-tracking branch 'upstream/master' into doc-markdown
2 parents bd23570 + 91292f1 commit fb943fb

File tree

320 files changed

+10025
-5211
lines changed

Some content is hidden

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

320 files changed

+10025
-5211
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report (False Negative)
3+
about: Create a bug report about missing warnings from a lint
4+
labels: L-bug, L-false-negative
5+
---
6+
<!--
7+
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
8+
along with any information you feel relevant to replicating the bug.
9+
-->
10+
Lint name:
11+
12+
13+
I tried this code:
14+
15+
```rust
16+
<code>
17+
```
18+
19+
I expected to see this happen: *explanation*
20+
21+
Instead, this happened: *explanation*
22+
23+
### Meta
24+
25+
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
26+
- `rustc -Vv`:
27+
```
28+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
29+
binary: rustc
30+
commit-hash: f455e46eae1a227d735091091144601b467e1565
31+
commit-date: 2020-06-20
32+
host: x86_64-unknown-linux-gnu
33+
release: 1.46.0-nightly
34+
LLVM version: 10.0
35+
```
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report (False Positive)
3+
about: Create a bug report about a wrongly emitted lint warning
4+
labels: L-bug, L-false-positive
5+
---
6+
<!--
7+
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
8+
along with any information you feel relevant to replicating the bug.
9+
-->
10+
Lint name:
11+
12+
13+
I tried this code:
14+
15+
```rust
16+
<code>
17+
```
18+
19+
I expected to see this happen: *explanation*
20+
21+
Instead, this happened: *explanation*
22+
23+
### Meta
24+
25+
- `cargo clippy -V`: e.g. clippy 0.0.212 (f455e46 2020-06-20)
26+
- `rustc -Vv`:
27+
```
28+
rustc 1.46.0-nightly (f455e46ea 2020-06-20)
29+
binary: rustc
30+
commit-hash: f455e46eae1a227d735091091144601b467e1565
31+
commit-date: 2020-06-20
32+
host: x86_64-unknown-linux-gnu
33+
release: 1.46.0-nightly
34+
LLVM version: 10.0
35+
```

.github/workflows/clippy.yml

Lines changed: 8 additions & 29 deletions
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,16 @@ 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
52+
53+
- name: Test "--fix -Zunstable-options"
54+
run: cargo run --features deny-warnings,internal-lints --bin cargo-clippy -- clippy --fix -Zunstable-options
7055

7156
- name: Test
72-
run: cargo test --features deny-warnings
57+
run: cargo test --features deny-warnings,internal-lints
7358

7459
- name: Test clippy_lints
75-
run: cargo test --features deny-warnings
60+
run: cargo test --features deny-warnings,internal-lints
7661
working-directory: clippy_lints
7762

7863
- name: Test rustc_tools_util
@@ -98,9 +83,3 @@ jobs:
9883
cargo dev new_lint --name new_late_pass --pass late
9984
cargo check
10085
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

.github/workflows/clippy_bors.yml

Lines changed: 13 additions & 84 deletions
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)
@@ -129,13 +110,13 @@ jobs:
129110
echo "$SYSROOT/bin" >> $GITHUB_PATH
130111
131112
- name: Build
132-
run: cargo build --features deny-warnings
113+
run: cargo build --features deny-warnings,internal-lints
133114

134115
- name: Test
135-
run: cargo test --features deny-warnings
116+
run: cargo test --features deny-warnings,internal-lints
136117

137118
- name: Test clippy_lints
138-
run: cargo test --features deny-warnings
119+
run: cargo test --features deny-warnings,internal-lints
139120
working-directory: clippy_lints
140121

141122
- name: Test rustc_tools_util
@@ -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

.github/workflows/clippy_dev.yml

Lines changed: 7 additions & 3 deletions
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

0 commit comments

Comments
 (0)