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

Commit 707494e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into rustup
2 parents 067bfe3 + 0c8799d commit 707494e

File tree

138 files changed

+1979
-908
lines changed

Some content is hidden

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

138 files changed

+1979
-908
lines changed

.cargo/config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[alias]
22
uitest = "test --test compile-test"
3-
dev = "run --target-dir clippy_dev/target --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
4-
lintcheck = "run --target-dir lintcheck/target --package lintcheck --bin lintcheck --manifest-path lintcheck/Cargo.toml -- "
3+
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
4+
lintcheck = "run --package lintcheck --bin lintcheck --manifest-path lintcheck/Cargo.toml -- "
55
collect-metadata = "test --test dogfood --features metadata-collector-lint -- run_metadata_collection_lint --ignored"
66

77
[build]
88
# -Zbinary-dep-depinfo allows us to track which rlib files to use for compiling UI tests
99
rustflags = ["-Zunstable-options", "-Zbinary-dep-depinfo"]
10+
target-dir = "target"

.github/ISSUE_TEMPLATE/blank_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ about: Create a blank issue.
88
Additional labels can be added to this issue by including the following command
99
(without the space after the @ symbol):
1010
11-
`@rustbot label +<label>`
11+
@ rustbot label +<label>
1212
1313
Common labels for this issue type are:
1414
* C-an-interesting-project

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LLVM version: 10.0
3636
Additional labels can be added to this issue by including the following command
3737
(without the space after the @ symbol):
3838
39-
`@rustbot label +<label>`
39+
@ rustbot label +<label>
4040
4141
Common labels for this issue type are:
4242
* `I-suggestion-causes-error`

.github/ISSUE_TEMPLATE/false_positive.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ LLVM version: 10.0
3737
Additional labels can be added to this issue by including the following command
3838
(without the space after the @ symbol):
3939
40-
`@rustbot label +<label>`
40+
@ rustbot label +<label>
4141
4242
Common labels for this issue type are:
4343
* I-suggestion-causes-error

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ Released 2020-11-19
10501050
[#5913](https://github.com/rust-lang/rust-clippy/pull/5913)
10511051
* Add example of false positive to [`ptr_arg`] docs.
10521052
[#5885](https://github.com/rust-lang/rust-clippy/pull/5885)
1053-
* [`box_vec`], [`vec_box`] and [`borrowed_box`]: add link to the documentation of `Box`
1053+
* [`box_vec`](https://rust-lang.github.io/rust-clippy/master/index.html#box_collection), [`vec_box`] and [`borrowed_box`]: add link to the documentation of `Box`
10541054
[#6023](https://github.com/rust-lang/rust-clippy/pull/6023)
10551055

10561056
## Rust 1.47
@@ -2570,7 +2570,7 @@ Released 2018-09-13
25702570
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
25712571
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
25722572
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
2573-
[`box_vec`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_vec
2573+
[`box_collection`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_collection
25742574
[`boxed_local`]: https://rust-lang.github.io/rust-clippy/master/index.html#boxed_local
25752575
[`branches_sharing_code`]: https://rust-lang.github.io/rust-clippy/master/index.html#branches_sharing_code
25762576
[`builtin_type_shadow`]: https://rust-lang.github.io/rust-clippy/master/index.html#builtin_type_shadow
@@ -2688,6 +2688,7 @@ Released 2018-09-13
26882688
[`if_let_some_result`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_let_some_result
26892689
[`if_not_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
26902690
[`if_same_then_else`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
2691+
[`if_then_panic`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_then_panic
26912692
[`if_then_some_else_none`]: https://rust-lang.github.io/rust-clippy/master/index.html#if_then_some_else_none
26922693
[`ifs_same_cond`]: https://rust-lang.github.io/rust-clippy/master/index.html#ifs_same_cond
26932694
[`implicit_clone`]: https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
@@ -2722,6 +2723,7 @@ Released 2018-09-13
27222723
[`iter_count`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_count
27232724
[`iter_next_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_loop
27242725
[`iter_next_slice`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
2726+
[`iter_not_returning_iterator`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_not_returning_iterator
27252727
[`iter_nth`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth
27262728
[`iter_nth_zero`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
27272729
[`iter_skip_next`]: https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
@@ -2905,6 +2907,7 @@ Released 2018-09-13
29052907
[`reversed_empty_ranges`]: https://rust-lang.github.io/rust-clippy/master/index.html#reversed_empty_ranges
29062908
[`same_functions_in_if_condition`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_functions_in_if_condition
29072909
[`same_item_push`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_item_push
2910+
[`same_name_method`]: https://rust-lang.github.io/rust-clippy/master/index.html#same_name_method
29082911
[`search_is_some`]: https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some
29092912
[`self_assignment`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_assignment
29102913
[`self_named_constructors`]: https://rust-lang.github.io/rust-clippy/master/index.html#self_named_constructors

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88
keywords = ["clippy", "lint", "plugin"]
99
categories = ["development-tools", "development-tools::cargo-plugins"]
1010
build = "build.rs"
11-
edition = "2018"
11+
edition = "2021"
1212
publish = false
1313

1414
[[bin]]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the
1818
| `clippy::style` | code that should be written in a more idiomatic way | **warn** |
1919
| `clippy::complexity` | code that does something simple but in a complex way | **warn** |
2020
| `clippy::perf` | code that can be written to run faster | **warn** |
21-
| `clippy::pedantic` | lints which are rather strict or might have false positives | allow |
21+
| `clippy::pedantic` | lints which are rather strict or have occasional false positives | allow |
2222
| `clippy::nursery` | new lints that are still under development | allow |
2323
| `clippy::cargo` | lints for the cargo manifest | allow |
2424

clippy_dev/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "clippy_dev"
33
version = "0.0.1"
4-
edition = "2018"
4+
edition = "2021"
55

66
[dependencies]
77
bytecount = "0.6"

clippy_dev/src/bless.rs

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! `bless` updates the reference files in the repo with changed output files
22
//! from the last test run.
33
4-
use std::env;
54
use std::ffi::OsStr;
65
use std::fs;
76
use std::lazy::SyncLazy;
@@ -10,17 +9,9 @@ use walkdir::WalkDir;
109

1110
use crate::clippy_project_root;
1211

13-
// NOTE: this is duplicated with tests/cargo/mod.rs What to do?
14-
pub static CARGO_TARGET_DIR: SyncLazy<PathBuf> = SyncLazy::new(|| match env::var_os("CARGO_TARGET_DIR") {
15-
Some(v) => v.into(),
16-
None => env::current_dir().unwrap().join("target"),
17-
});
18-
1912
static CLIPPY_BUILD_TIME: SyncLazy<Option<std::time::SystemTime>> = SyncLazy::new(|| {
20-
let profile = env::var("PROFILE").unwrap_or_else(|_| "debug".to_string());
21-
let mut path = PathBuf::from(&**CARGO_TARGET_DIR);
22-
path.push(profile);
23-
path.push("cargo-clippy");
13+
let mut path = std::env::current_exe().unwrap();
14+
path.set_file_name("cargo-clippy");
2415
fs::metadata(path).ok()?.modified().ok()
2516
});
2617

@@ -94,10 +85,7 @@ fn updated_since_clippy_build(path: &Path) -> Option<bool> {
9485
}
9586

9687
fn build_dir() -> PathBuf {
97-
let profile = env::var("PROFILE").unwrap_or_else(|_| "debug".to_string());
98-
let mut path = PathBuf::new();
99-
path.push(CARGO_TARGET_DIR.clone());
100-
path.push(profile);
101-
path.push("test_build_base");
88+
let mut path = std::env::current_exe().unwrap();
89+
path.set_file_name("test");
10290
path
10391
}

clippy_lints/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"
77
license = "MIT OR Apache-2.0"
88
keywords = ["clippy", "lint", "plugin"]
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[dependencies]
1212
cargo_metadata = "0.12"

0 commit comments

Comments
 (0)