Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 415fdb2

Browse files
committed
Merge remote-tracking branch 'upstream/master' into rustup
2 parents 660ef4f + bafde54 commit 415fdb2

File tree

522 files changed

+5226
-2531
lines changed

Some content is hidden

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

522 files changed

+5226
-2531
lines changed

.github/workflows/clippy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
5151
5252
- name: Build
53-
run: cargo build --features deny-warnings,internal
53+
run: cargo build --tests --features deny-warnings,internal
5454

5555
- name: Test
5656
run: cargo test --features deny-warnings,internal

.github/workflows/clippy_bors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
echo "$SYSROOT/bin" >> $GITHUB_PATH
107107
108108
- name: Build
109-
run: cargo build --features deny-warnings,internal
109+
run: cargo build --tests --features deny-warnings,internal
110110

111111
- name: Test
112112
if: runner.os == 'Linux'

CHANGELOG.md

Lines changed: 110 additions & 70 deletions
Large diffs are not rendered by default.

Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@ walkdir = "2.3"
3636
filetime = "0.2"
3737
itertools = "0.10.1"
3838

39+
# UI test dependencies
40+
clippy_utils = { path = "clippy_utils" }
41+
derive-new = "0.5"
42+
if_chain = "1.0"
43+
quote = "1.0"
44+
serde = { version = "1.0.125", features = ["derive"] }
45+
syn = { version = "2.0", features = ["full"] }
46+
futures = "0.3"
47+
parking_lot = "0.12"
48+
tokio = { version = "1", features = ["io-util"] }
49+
3950
[build-dependencies]
4051
rustc_tools_util = "0.3.0"
4152

README.md

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

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

8-
[There are over 600 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
8+
[There are over 650 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
99

1010
Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
1111
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.

book/src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
A collection of lints to catch common mistakes and improve your
77
[Rust](https://github.com/rust-lang/rust) code.
88

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

1111
Lints are divided into categories, each with a default [lint
1212
level](https://doc.rust-lang.org/rustc/lints/levels.html). You can choose how

book/src/development/infrastructure/changelog_update.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,6 @@ and open that file in your editor of choice.
5656
When updating the changelog it's also a good idea to make sure that `commit1` is
5757
already correct in the current changelog.
5858

59-
#### PR ranges
60-
61-
We developed the concept of PR ranges to help the user understand the size of a new update. To create a PR range,
62-
get the current release date and the date that the last version was released (YYYY-MM-DD) and use the following link:
63-
64-
```
65-
[**View <NUMBER OF PRs> PRs merged since 1.<LAST VERSION NUM>**](https://github.com/rust-lang/rust-clippy/pulls?q=is%3Apr+is%3Aclosed+merged%3A<LAST VERSION DATE>..<CURRENT VERSION DATE>+base%3Amaster+sort%3Amerged-desc+)
66-
```
67-
68-
> Note: Be sure to check click the link and check how many PRs got merged between
69-
70-
Example:
71-
72-
```
73-
[**View 85 PRs merged since 1.69**](https://github.com/rust-lang/rust-clippy/pulls?q=is%3Apr+is%3Aclosed+merged%3A2023-04-20..2023-06-01+base%3Amaster+sort%3Amerged-desc+)
74-
```
75-
76-
Which renders to:
77-
[**View 85 PRs merged since 1.69**](https://github.com/rust-lang/rust-clippy/pulls?q=is%3Apr+is%3Aclosed+merged%3A2023-04-20..2023-06-01+base%3Amaster+sort%3Amerged-desc+)
78-
79-
Note that **commit ranges should not be included**, only PR ranges.
80-
8159
### 3. Authoring the final changelog
8260

8361
The above script should have dumped all the relevant PRs to the file you

book/src/development/speedtest.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Speedtest
2+
`SPEEDTEST` is the tool we use to measure lint's performance, it works by executing the same test several times.
3+
4+
It's useful for measuring changes to current lints and deciding if the performance changes too much. `SPEEDTEST` is
5+
accessed by the `SPEEDTEST` (and `SPEEDTEST_*`) environment variables.
6+
7+
## Checking Speedtest
8+
9+
To do a simple speed test of a lint (e.g. `allow_attributes`), use this command.
10+
11+
```sh
12+
$ SPEEDTEST=ui TESTNAME="allow_attributes" cargo uitest -- --nocapture
13+
```
14+
15+
This will test all `ui` tests (`SPEEDTEST=ui`) whose names start with `allow_attributes`. By default, `SPEEDTEST` will
16+
iterate your test 1000 times. But you can change this with `SPEEDTEST_ITERATIONS`.
17+
18+
```sh
19+
$ SPEEDTEST=toml SPEEDTEST_ITERATIONS=100 TESTNAME="semicolon_block" cargo uitest -- --nocapture
20+
```
21+
22+
> **WARNING**: Be sure to use `-- --nocapture` at the end of the command to see the average test time. If you don't
23+
> use `-- --nocapture` (e.g. `SPEEDTEST=ui` `TESTNAME="let_underscore_untyped" cargo uitest -- --nocapture`), this
24+
> will not show up.

book/src/lint_configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ The maximum amount of nesting a block can reside in
175175

176176
## `disallowed-names`
177177
The list of disallowed names to lint about. NB: `bar` is not here since it has legitimate uses. The value
178-
`".."` can be used as part of the list to indicate, that the configured values should be appended to the
178+
`".."` can be used as part of the list to indicate that the configured values should be appended to the
179179
default configuration of Clippy. By default, any configuration will replace the default value.
180180

181181
**Default Value:** `["foo", "baz", "quux"]` (`Vec<String>`)

clippy_dev/src/setup/intellij.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl ClippyProjectInfo {
3737

3838
pub fn setup_rustc_src(rustc_path: &str) {
3939
let Ok(rustc_source_dir) = check_and_get_rustc_dir(rustc_path) else {
40-
return
40+
return;
4141
};
4242

4343
for project in CLIPPY_PROJECTS {

0 commit comments

Comments
 (0)