Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clippyup #92849

Merged
merged 97 commits into from
Jan 14, 2022
Merged

Clippyup #92849

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
1788cfd
Remove NullOp::Box
nbdd0121 Sep 26, 2021
d5cbae9
fix clippy
lcnr Dec 23, 2021
dfd3254
Update pulldown-cmark version in clippy
GuillaumeGomez Dec 28, 2021
828ddbe
fix [`redundant_closure`] fp with `Arc`
ebobrow Dec 29, 2021
97ab44c
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
flip1995 Dec 30, 2021
2b5257e
Remove method_call! macro
camsteffen Dec 30, 2021
1f3d6a6
Auto merge of #92252 - GuillaumeGomez:update-pulldown, r=camelid,xFre…
bors Dec 31, 2021
65d1f83
Extend [`unused_io_amount`] to cover AsyncRead and AsyncWrite.
nmathewson Dec 27, 2021
b6bcf0c
unused_io_amount: Use span_lint_and_help.
nmathewson Dec 31, 2021
490566b
Auto merge of #8179 - nmathewson:unused_async_io_amount, r=xFrednet
bors Dec 31, 2021
c736a63
Auto merge of #8193 - ebobrow:redundant_closure_fp, r=Manishearth
bors Dec 31, 2021
3d41358
wrong_self_convention: Match `SelfKind::No` more restrictively
nmathewson Jan 1, 2022
f5bbd1b
Make tidy check for magic numbers that spell things
joshtriplett Jan 1, 2022
262b148
return_self_not_must_use document `#[must_use]` on the type
bors Jan 1, 2022
7616eb0
Auto merge of #8209 - xFrednet:8197-mention-attribute-on-struct, r=ll…
bors Jan 1, 2022
b25dbc6
Auto merge of #8208 - nmathewson:selfkind_no_fix, r=xFrednet
bors Jan 2, 2022
e8b6b2a
erasing_op lint ignored when output type is different from the non-co…
Dec 31, 2021
8419108
Auto merge of #8204 - wigy-opensource-developer:fix-7210, r=xFrednet
bors Jan 2, 2022
6975071
Rollup merge of #90102 - nbdd0121:box3, r=jonas-schievink
matthiaskrgr Jan 3, 2022
19cfcd5
Fix clippy warnings
pmnoxx Jan 3, 2022
3ea7784
Auto merge of #8216 - pmnoxx:piotr-fix-clippy-warnings, r=xFrednet
bors Jan 3, 2022
ff58efb
Better detect when a field can be moved from in `while_let_on_iterator`
Jarcho Jan 4, 2022
00da1b8
Remove in_macro from utils
camsteffen Jan 4, 2022
a7097b8
Consider auto-deref when linting `manual_swap`
Jarcho Jan 4, 2022
0e28e38
Auto merge of #8220 - Jarcho:manual_swap_8154, r=camsteffen
bors Jan 4, 2022
2dd216a
Check for full equality in `type_repetition_in_bounds` rather than ju…
Jarcho Jan 4, 2022
d7a6033
Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU
matthiaskrgr Jan 4, 2022
786f874
New macro utils
bors Jan 4, 2022
ba03dc7
Auto merge of #8219 - camsteffen:macro-decoupling, r=llogiq
bors Jan 4, 2022
d5dcda2
Auto merge of #8223 - camsteffen:remove-in-macro, r=llogiq
bors Jan 5, 2022
20f2a89
Auto merge of #8224 - Jarcho:type_repetition_in_bounds_8162, r=llogiq
bors Jan 5, 2022
92048f4
Auto merge of #8221 - Jarcho:while_let_on_iterator_8113, r=llogiq
bors Jan 5, 2022
a4ebf6f
Change `unnecessary_to_owned` `into_iter` suggestions to `MaybeIncorr…
smoelius Dec 30, 2021
14f3445
Don't lint `DequeVec` in `manual_memcpy`
Jarcho Jan 5, 2022
3925def
Suggest `copy_from_slice` for `manual_memcpy` when possible
Jarcho Jan 5, 2022
2cc38a2
Lint `iter_not_returning_iterator` on the trait definition rather tha…
Jarcho Jan 5, 2022
d98339d
Handle type projections in `iter_not_returning_iterator`
Jarcho Jan 5, 2022
94fe671
Allow running lintcheck with a renamed rust-clippy dir
Alexendoo Jan 6, 2022
be7cf76
Auto merge of #8234 - Alexendoo:lintcheck-allow-renamed-dir, r=xFrednet
bors Jan 7, 2022
c34e3f0
Update clippy for associated item changes
matthewjasper Nov 18, 2021
366234a
Add `unnecessary_to_owned` "Known problems" section
smoelius Jan 8, 2022
917890b
Auto merge of #8201 - smoelius:master, r=camsteffen
bors Jan 8, 2022
3ea5208
Set binary-dep-depinfo in .cargo/config.toml
sourcefrog Jan 8, 2022
83a9f68
Auto merge of #8249 - sourcefrog:depinfo, r=Manishearth
bors Jan 9, 2022
1288b80
rustc_metadata: Optimize and document module children decoding
petrochenkov Dec 18, 2021
c8ea042
rustc_metadata: Rename `item_children(_untracked)` to `module_childre…
petrochenkov Dec 23, 2021
f690978
cover trait for `trait_duplication_in_bounds`
dswij Jan 6, 2022
a6f80fc
new lint: `single_char_lifetime_names`
bors Jan 9, 2022
5991695
Auto merge of #8236 - PatchMixolydic:single_char_lifetime_names, r=ll…
bors Jan 9, 2022
16d8488
Combine internal features in clippy_utils
camsteffen Jan 10, 2022
e2ce4f9
Combine internal features in clippy_lints
camsteffen Jan 10, 2022
f4dc348
`trait_duplication_in_bounds` Update description and add test
dswij Jan 10, 2022
88cfd70
Auto merge of #8252 - dswij:8229, r=xFrednet
bors Jan 10, 2022
1816361
Auto merge of #8257 - camsteffen:internal-features, r=giraffate
bors Jan 10, 2022
b66dbe8
Auto merge of #8228 - Jarcho:iter_not_returning_iterator_8225, r=gira…
bors Jan 10, 2022
cf86cee
Downgrade mutex_atomic to nursery
taiki-e Jan 10, 2022
5f143c6
Warn disallowed_methods and disallowed_types by default
taiki-e Jan 10, 2022
e66ecf6
Run dogfood on windows
camsteffen Jan 10, 2022
7cf4f44
Fix output capturing
camsteffen Jan 10, 2022
51dbbf3
Refactor test utils
camsteffen Jan 10, 2022
d356fb9
Use `rustup which rustfmt`
camsteffen Jan 10, 2022
920e9f0
Move workspace test
camsteffen Jan 10, 2022
4a54933
Merge dogfood tests
camsteffen Jan 10, 2022
21343ab
Remove rustfmt component check
camsteffen Jan 10, 2022
51282fc
Auto merge of #8261 - taiki-e:disallowed, r=giraffate
bors Jan 10, 2022
01ef7c7
Fix dogfood
camsteffen Jan 10, 2022
fccf07b
Auto merge of #8260 - taiki-e:mutex_atomic, r=llogiq
bors Jan 11, 2022
3298de7
Add borrow_as_ptr lint
guerinoni Jan 2, 2022
fd97d79
`README`: `clippy-driver` is not a replacement for `rustc`
ojeda Nov 27, 2021
3d4fded
`README`: mention `clippy-driver` on usage list
ojeda Dec 14, 2021
dda2aef
Store a `Symbol` instead of an `Ident` in `VariantDef`/`FieldDef`
Aaron1011 Jan 3, 2022
fd9cebe
Auto merge of #8210 - guerinoni:master, r=Manishearth
bors Jan 11, 2022
02ec39b
Stop using in_band_lifetimes
camsteffen Jan 11, 2022
7e989ec
Improve documentation for `borrowed-box` lint
1nF0rmed Jan 10, 2022
88f5be2
Auto merge of #8262 - 1nF0rmed:chore-update-borrowed-box-doc, r=camst…
bors Jan 11, 2022
d32277d
Don't lint `deref_addrof` when the two operations occur in different …
Jarcho Jan 12, 2022
37e9985
Auto merge of #8268 - Jarcho:deref_addrof_8247, r=flip1995
bors Jan 12, 2022
0d94167
Auto merge of #8198 - camsteffen:no-method-call-macro, r=flip1995
bors Jan 12, 2022
ae01c4a
Auto merge of #8190 - camsteffen:no-in-band-liftetimes, r=flip1995
bors Jan 12, 2022
b9cae79
Auto merge of #8037 - ojeda:doc-codegen-change, r=camsteffen
bors Jan 12, 2022
166737f
Add manual_bits lint
paolobarbolini Jan 2, 2022
91581f6
Resolve primitive impls in clippy_utils::path_to_res
Alexendoo Dec 9, 2021
7c82ae1
Auto merge of #8213 - paolobarbolini:size-of-as-bits, r=flip1995
bors Jan 12, 2022
04eb27a
Use method name from conf::DisallowedMethod
Alexendoo Dec 9, 2021
6f33f69
Auto merge of #8112 - Alexendoo:disallowed_methods_primitives, r=flip…
bors Jan 12, 2022
90bf72c
Only run dogfood on linux in CI
camsteffen Jan 12, 2022
133b366
Auto merge of #8265 - camsteffen:which-rustfmt, r=xFrednet
bors Jan 12, 2022
5479024
Auto merge of #8266 - camsteffen:test-tweaks, r=flip1995
bors Jan 12, 2022
062db10
Add `manual_memcpy_test` for `VecDeque`
Jarcho Jan 12, 2022
60e68d6
Auto merge of #8226 - Jarcho:manual_memcpy_8160, r=flip1995
bors Jan 12, 2022
11be495
Merge remote-tracking branch 'upstream/master' into rustup
flip1995 Jan 13, 2022
8a2141b
Bump Clippy Version -> 0.1.60
flip1995 Jan 13, 2022
6ad05bc
Bump nightly version -> 2022-01-13
flip1995 Jan 13, 2022
97a5daa
Auto merge of #8272 - flip1995:rustup, r=flip1995
bors Jan 13, 2022
ba66384
Merge commit '97a5daa65908e59744e2bc625b14849352231c75' into clippyup
flip1995 Jan 13, 2022
159d6c3
Update Cargo.lock
flip1995 Jan 13, 2022
b83c77c
Fix Clippy sync fallout
flip1995 Jan 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -613,14 +613,15 @@ dependencies = [

[[package]]
name = "clippy"
version = "0.1.59"
version = "0.1.60"
dependencies = [
"cargo_metadata 0.14.0",
"clippy_lints",
"clippy_utils",
"compiletest_rs",
"derive-new",
"filetime",
"futures 0.3.12",
"if_chain",
"itertools 0.10.1",
"parking_lot",
Expand All @@ -633,6 +634,7 @@ dependencies = [
"syn",
"tempfile",
"tester",
"tokio",
]

[[package]]
Expand All @@ -652,7 +654,7 @@ dependencies = [

[[package]]
name = "clippy_lints"
version = "0.1.59"
version = "0.1.60"
dependencies = [
"cargo_metadata 0.14.0",
"clippy_utils",
Expand All @@ -673,8 +675,9 @@ dependencies = [

[[package]]
name = "clippy_utils"
version = "0.1.59"
version = "0.1.60"
dependencies = [
"arrayvec",
"if_chain",
"rustc-semver",
]
Expand Down
5 changes: 4 additions & 1 deletion src/tools/clippy/.cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
uitest = "test --test compile-test"
dev = "run --package clippy_dev --bin clippy_dev --manifest-path clippy_dev/Cargo.toml --"
lintcheck = "run --package lintcheck --bin lintcheck --manifest-path lintcheck/Cargo.toml -- "
collect-metadata = "test --test dogfood --features metadata-collector-lint -- run_metadata_collection_lint --ignored"
collect-metadata = "test --test dogfood --features internal -- run_metadata_collection_lint --ignored"

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

[unstable]
binary-dep-depinfo = true
16 changes: 4 additions & 12 deletions src/tools/clippy/.github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ jobs:
echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV

- name: Build
run: cargo build --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo build --features deny-warnings,internal

- name: Test
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo test --features deny-warnings,internal

- name: Test clippy_lints
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo test --features deny-warnings,internal
working-directory: clippy_lints

- name: Test clippy_utils
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo test --features deny-warnings,internal
working-directory: clippy_utils

- name: Test rustc_tools_util
Expand All @@ -70,14 +70,6 @@ jobs:
run: cargo test --features deny-warnings
working-directory: clippy_dev

- name: Test cargo-clippy
run: ../target/debug/cargo-clippy
working-directory: clippy_workspace_tests

- name: Test cargo-clippy --fix
run: ../target/debug/cargo-clippy clippy --fix
working-directory: clippy_workspace_tests

- name: Test clippy-driver
run: bash .github/driver.sh
env:
Expand Down
21 changes: 9 additions & 12 deletions src/tools/clippy/.github/workflows/clippy_bors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,22 @@ jobs:
echo "$SYSROOT/bin" >> $GITHUB_PATH

- name: Build
run: cargo build --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo build --features deny-warnings,internal

- name: Test
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
if: runner.os == 'Linux'
run: cargo test --features deny-warnings,internal

- name: Test
if: runner.os != 'Linux'
run: cargo test --features deny-warnings,internal -- --skip dogfood

- name: Test clippy_lints
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo test --features deny-warnings,internal
working-directory: clippy_lints

- name: Test clippy_utils
run: cargo test --features deny-warnings,internal-lints,metadata-collector-lint
run: cargo test --features deny-warnings,internal
working-directory: clippy_utils

- name: Test rustc_tools_util
Expand All @@ -133,14 +138,6 @@ jobs:
run: cargo test --features deny-warnings
working-directory: clippy_dev

- name: Test cargo-clippy
run: ../target/debug/cargo-clippy
working-directory: clippy_workspace_tests

- name: Test cargo-clippy --fix
run: ../target/debug/cargo-clippy clippy --fix
working-directory: clippy_workspace_tests

- name: Test clippy-driver
run: bash .github/driver.sh
env:
Expand Down
1 change: 0 additions & 1 deletion src/tools/clippy/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ out
/target
/clippy_lints/target
/clippy_utils/target
/clippy_workspace_tests/target
/clippy_dev/target
/lintcheck/target
/rustc_tools_util/target
Expand Down
3 changes: 3 additions & 0 deletions src/tools/clippy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2887,6 +2887,7 @@ Released 2018-09-13
[`blocks_in_if_conditions`]: https://rust-lang.github.io/rust-clippy/master/index.html#blocks_in_if_conditions
[`bool_assert_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
[`bool_comparison`]: https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
[`borrow_as_ptr`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_as_ptr
[`borrow_interior_mutable_const`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrow_interior_mutable_const
[`borrowed_box`]: https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box
[`box_collection`]: https://rust-lang.github.io/rust-clippy/master/index.html#box_collection
Expand Down Expand Up @@ -3070,6 +3071,7 @@ Released 2018-09-13
[`main_recursion`]: https://rust-lang.github.io/rust-clippy/master/index.html#main_recursion
[`manual_assert`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_assert
[`manual_async_fn`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_async_fn
[`manual_bits`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
[`manual_filter_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter_map
[`manual_find_map`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_find_map
[`manual_flatten`]: https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten
Expand Down Expand Up @@ -3253,6 +3255,7 @@ Released 2018-09-13
[`should_implement_trait`]: https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
[`similar_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#similar_names
[`single_char_add_str`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
[`single_char_lifetime_names`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_char_lifetime_names
[`single_char_pattern`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
[`single_component_path_imports`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
[`single_element_loop`]: https://rust-lang.github.io/rust-clippy/master/index.html#single_element_loop
Expand Down
7 changes: 4 additions & 3 deletions src/tools/clippy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy"
version = "0.1.59"
version = "0.1.60"
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
readme = "README.md"
Expand Down Expand Up @@ -47,16 +47,17 @@ itertools = "0.10"
quote = "1.0"
serde = { version = "1.0", features = ["derive"] }
syn = { version = "1.0", features = ["full"] }
futures = "0.3"
parking_lot = "0.11.2"
tokio = { version = "1", features = ["io-util"] }

[build-dependencies]
rustc_tools_util = { version = "0.2", path = "rustc_tools_util" }

[features]
deny-warnings = ["clippy_lints/deny-warnings"]
integration = ["tempfile"]
internal-lints = ["clippy_lints/internal-lints"]
metadata-collector-lint = ["internal-lints", "clippy_lints/metadata-collector-lint"]
internal = ["clippy_lints/internal"]

[package.metadata.rust-analyzer]
# This package uses #[feature(rustc_private)]
Expand Down
22 changes: 9 additions & 13 deletions src/tools/clippy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

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

[There are over 450 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
[There are over 500 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)

Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.
Expand Down Expand Up @@ -37,8 +37,8 @@ Table of contents:

## Usage

Below are instructions on how to use Clippy as a subcommand, compiled from source
or in Travis CI.
Below are instructions on how to use Clippy as a cargo subcommand,
in projects that do not use cargo, or in Travis CI.

### As a cargo subcommand (`cargo clippy`)

Expand Down Expand Up @@ -98,22 +98,18 @@ If you want to run Clippy **only** on the given crate, use the `--no-deps` optio
cargo clippy -p example -- --no-deps
```

### As a rustc replacement (`clippy-driver`)
### Using `clippy-driver`

Clippy can also be used in projects that do not use cargo. To do so, you will need to replace
your `rustc` compilation commands with `clippy-driver`. For example, if your project runs:

```terminal
rustc --edition 2018 -Cpanic=abort foo.rs
```

Then, to enable Clippy, you will need to call:
Clippy can also be used in projects that do not use cargo. To do so, run `clippy-driver`
with the same arguments you use for `rustc`. For example:

```terminal
clippy-driver --edition 2018 -Cpanic=abort foo.rs
```

Note that `rustc` will still run, i.e. it will still emit the output files it normally does.
Note that `clippy-driver` is designed for running Clippy only and should not be used as a general
replacement for `rustc`. `clippy-driver` may produce artifacts that are not optimized as expected,
for example.

### Travis CI

Expand Down
32 changes: 26 additions & 6 deletions src/tools/clippy/clippy_dev/src/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use itertools::Itertools;
use shell_escape::escape;
use std::ffi::{OsStr, OsString};
use std::path::Path;
use std::process::{self, Command};
use std::process::{self, Command, Stdio};
use std::{fs, io};
use walkdir::WalkDir;

Expand Down Expand Up @@ -31,6 +31,7 @@ impl From<walkdir::Error> for CliError {
struct FmtContext {
check: bool,
verbose: bool,
rustfmt_path: String,
}

// the "main" function of cargo dev fmt
Expand Down Expand Up @@ -102,7 +103,23 @@ Please revert the changes to Cargo.tomls first."
}
}

let context = FmtContext { check, verbose };
let output = Command::new("rustup")
.args(["which", "rustfmt"])
.stderr(Stdio::inherit())
.output()
.expect("error running `rustup which rustfmt`");
if !output.status.success() {
eprintln!("`rustup which rustfmt` did not execute successfully");
process::exit(1);
}
let mut rustfmt_path = String::from_utf8(output.stdout).expect("invalid rustfmt path");
rustfmt_path.truncate(rustfmt_path.trim_end().len());

let context = FmtContext {
check,
verbose,
rustfmt_path,
};
let result = try_run(&context);
let code = match result {
Ok(true) => 0,
Expand Down Expand Up @@ -141,8 +158,12 @@ fn exec(
println!("{}", format_command(&program, &dir, args));
}

let child = Command::new(&program).current_dir(&dir).args(args.iter()).spawn()?;
let output = child.wait_with_output()?;
let output = Command::new(&program)
.env("RUSTFMT", &context.rustfmt_path)
.current_dir(&dir)
.args(args.iter())
.output()
.unwrap();
let success = output.status.success();

if !context.check && !success {
Expand All @@ -159,7 +180,6 @@ fn exec(
fn cargo_fmt(context: &FmtContext, path: &Path) -> Result<bool, CliError> {
let mut args = vec!["fmt", "--all"];
if context.check {
args.push("--");
args.push("--check");
}
let success = exec(context, "cargo", path, &args)?;
Expand Down Expand Up @@ -200,7 +220,7 @@ fn rustfmt(context: &FmtContext, paths: impl Iterator<Item = OsString>) -> Resul
}
args.extend(paths);

let success = exec(context, "rustfmt", std::env::current_dir()?, &args)?;
let success = exec(context, &context.rustfmt_path, std::env::current_dir()?, &args)?;

Ok(success)
}
2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_dev/src/update_lints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ fn gen_register_lint_list<'a>(

for (is_public, module_name, lint_name) in details {
if !is_public {
output.push_str(" #[cfg(feature = \"internal-lints\")]\n");
output.push_str(" #[cfg(feature = \"internal\")]\n");
}
output.push_str(&format!(" {}::{},\n", module_name, lint_name));
}
Expand Down
5 changes: 2 additions & 3 deletions src/tools/clippy/clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "clippy_lints"
version = "0.1.59"
version = "0.1.60"
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
repository = "https://github.com/rust-lang/rust-clippy"
readme = "README.md"
Expand Down Expand Up @@ -30,8 +30,7 @@ url = { version = "2.2", features = ["serde"] }
[features]
deny-warnings = ["clippy_utils/deny-warnings"]
# build clippy with internal lints enabled, off by default
internal-lints = ["clippy_utils/internal-lints"]
metadata-collector-lint = ["serde_json", "clippy_utils/metadata-collector-lint"]
internal = ["clippy_utils/internal", "serde_json"]

[package.metadata.rust-analyzer]
# This crate uses #[feature(rustc_private)]
Expand Down
Loading