Skip to content

Commit

Permalink
Entered supposed changes, ran cargo dev fmt, test, and bless.
Browse files Browse the repository at this point in the history
initial step towards implementing C string literals

rm diag item, use lang item

Merge commit '371120bdbf58a331db5dcfb2d9cddc040f486de8' into clippyup

Make the BUG_REPORT_URL configurable by tools

This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy
the entire hook implementation.

- Switch clippy to the new hook

  This also adds a `extra_info` callback so clippy can include its own version number, which differs
  from rustc's.

- Call `install_ice_hook` in rustfmt

make (try_)subst_and_normalize_erasing_regions take EarlyBinder

changes from review: add FIXME to clippy and change subst_identity to skip_binder in mir subst methods

IAT: Introduce AliasKind::Inherent

Drop uplifted clippy::drop_ref

Drop uplifted clippy::drop_copy

Drop uplifted clippy::forget_ref

Drop uplifted clippy::forget_copy

Exposes false negative in clippy's diverging_sub_expression

Remove `LangItems::require`

It's just a short wrapper used by `tcx.require_lang_item`. Deleting it
gives us a negative diff.

Exclude inherent projections from some alias ty matches

Merge commit '435a8ad86c7a33bd7ffb91c59039943408d3b6aa' into clippyup

Rename `drop_copy` lint to `dropping_copy_types`

Rename `forget_copy` lint to `forgetting_copy_types`

Rename `drop_ref` lint to `dropping_references`

Rename `forget_ref` lint to `forgetting_references`

Replace EarlyBinder(x) with EarlyBinder::new(x)

Make EarlyBinder's inner value private; and fix all of the resulting errors

Use `Cow` in `{D,Subd}iagnosticMessage`.

Each of `{D,Subd}iagnosticMessage::{Str,Eager}` has a comment:
```
// FIXME(davidtwco): can a `Cow<'static, str>` be used here?
```
This commit answers that question in the affirmative. It's not the most
compelling change ever, but it might be worth merging.

This requires changing the `impl<'a> From<&'a str>` impls to `impl
From<&'static str>`, which involves a bunch of knock-on changes that
require/result in call sites being a little more precise about exactly
what kind of string they use to create errors, and not just `&str`. This
will result in fewer unnecessary allocations, though this will not have
any notable perf effects given that these are error paths.

Note that I was lazy within Clippy, using `to_string` in a few places to
preserve the existing string imprecision. I could have used `impl
Into<{D,Subd}iagnosticMessage>` in various places as is done in the
compiler, but that would have required changes to *many* call sites
(mostly changing `&format("...")` to `format!("...")`) which didn't seem
worthwhile.

Drop uplifted clippy::invalid_utf8_in_unchecked

EarlyBinder::new -> EarlyBinder::bind

Drop uplifted clippy::cast_ref_to_mut

Use translatable diagnostics in `rustc_const_eval`

Implement custom diagnostic for ConstParamTy

Merge commit '30448e8cf98d4754350db0c959644564f317bc0f' into clippyup

Rename `impl_defaultness` to `defaultness`

Removed stable/unstable sort arg from into_sorted_stable_ord, fixed a few misc issues, added collect to UnordItems

Whoops, submodule change was actually valid - undoing fixup

Drop uplifted clippy::undropped_manually_drops

Drop uplifted `clippy:cmp_nan`

Extend `unused_must_use` to cover block exprs

Add `AliasKind::Weak` for type aliases.

Only use it when the type alias contains an opaque type.

Also does wf-checking on such type aliases.

Move WF goal to clause

Move ConstEvaluatable to Clause

Treat TAIT equation as always ambiguous in coherence

Better error for non const `PartialEq` call generated by `match`

Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata

s/Clause/ClauseKind

Support `ast::ExprKind::Become` in clippy

Migrate item_bounds to ty::Clause

Do not offer any of the suggestions in emit_coerce_suggestions for expr from destructuring assignment desugaring

Support `hir::ExprKind::Become` in clippy

Migrate predicates_of and caller_bounds to Clause

Provide more context for `rustc +nightly -Zunstable-options` on stable

Make simd_shuffle_indices use valtrees

Merge commit '37f4c1725d3fd7e9c3ffd8783246bc5589debc53' into clippyup

Fix valtree changes

Fix compile-test tests to work with the new ui_test crate

Deal with fallout

Patch clippy

Move `TyCtxt::mk_x` to `Ty::new_x` where applicable

Fix failing clippy tests

Comments out the C string literals due to rust-lang/rust#113334

Fixes rust-lang#11121

Rename `adjustment::PointerCast` and variants using it to `PointerCoercion`

It makes it sound like the `ExprKind` and `Rvalue` are supposed to represent all pointer related
casts, when in reality their just used to share a some enum variants. Make it clear there these
are only coercion to make it clear why only some pointer related "casts" are in the enum.

Delete `to_string_in_format_args_incremental.rs`

It fails CI and passes locally. It passes random directores in
`-Cincremental` so maybe something's up. It shouldn't block us here.

Drop uplifted `clippy::fn_null_check`

Ignore flaky clippy tests.

Suggest the correct variable name for `manual_let_else`

Split if conditions by its semantics

Remove old feature flag in code comment

Since let_else feature has been stable in 1.65.0, it's now unnecessary

Avoid renaming for TupleStruct with multiple arguments

update spec

fix: move specs in fire

Fix: Some suggestions generated by the option_if_let_else lint did not compile

bump up `regex-syntax` dependency version to 0.7.0

Ignoring `let_underscore_untyped` warnings in code from proc macros

fixing fmt

Checking for proc_macro not only when local.init is Some

Remove unnecessary  from  example

fix example heading in `string_slice`

don't remove `dbg!` in arbitrary expressions

handle nested macros and add tests for them

Rename integer_arithmetic

redundant_pattern_matching

redundant_pattern_matching

fix conflict with matches macro

fix conflict with matches macro

fix error test

update a func

fix reviewer comments

fix reviewer comments: tests results

update tests

update test option

Don't suggest unnameable types in box_default, let_underscore_untyped

Search for inactive `cfg` attributes and empty macro expansion through
the entire block

Slightly refactor constant evaluation and add detection for empty macro expansion and `cfg`ed statements.

Improve `SpanlessEq`
* Don't consider expansions of different macros to be the same, even if they expand to the same tokens
* Don't consider `cfg!` expansions to be equal if they check different configs.

enhance `needless_collect`

Updates `needless_collect` to lint for collecting into a method or
function argument thats taking an `IntoIterator` (for example `extend`).
Every `Iterator` trivially implements `IntoIterator` and colleting it
only causes an unnecessary allocation.

Add new `UNIQUE_CFG_CONDITION` lint

Add UI test for UNIQUE_CFG_CONDITION

Update CHANGELOG

Add check for empty cfg `all` condition

Update urls in Type Checking

Bump nightly version -> 2023-05-20

[`match_wild_err_arm`]: do not lint in const contexts

consider array initializer for `large_stack_arrays`

add test case for rust-lang#10741

Unit tests highlighting unsafe match issue

These unit tests generate non-compilable code.  I did NOT `bless` them on purpose because the stderr output is not good.

I'm surprised we don't auto-compile the suggestions here - is this something that can be easily enabled?

See rust-lang#10808

Fix unsafe blocks

Use #[rustfmt::skip]

remove todo

Run-rustfix

needless_else: new lint to check for empty else clauses

the implementation!!

check msrv

Update clippy_lints/src/casts/ptr_cast_constness.rs

Co-authored-by: llogiq <bogusandre@gmail.com>

add description and rename msrv tests

change `clippy::version` to 1.71.0

Display the `needless_return` suggestion

error out if lint name contains dash

replace `-` instead of erroring out

apply suggestion

Co-authored-by: Philipp Krones <hello@philkrones.com>

Address Dependabot alerts

do not consider `await` in nested `async` blocks

remove old span_lint

point to `await` expr in note

redundant pattern matches! result

[`default_constructed_unit_structs`]: do not lint type aliases

Ignore #[cfg]'d out code in needless_else

Fix formatting of if let chain

Some improvements to the manual_let_else lint suggestions

* Replace variables inside | patterns in the if let: let v = if let V::A(v) | V::B(v) = v { v } else ...
* Support nested patterns: let v = if let Ok(Ok(Ok(v))) = v { v } else ...
* Support tuple structs with more than one arg: let v = V::W(v, _) = v { v } else ...
* Correctly handle .. in tuple struct patterns: let v = V::X(v, ..) = v { v } else ...

Fixing `invalid_regex` with invalid UTF8. Also, adding more test cases

Update version attribute for 1.70 lints

Changelog for Rust 1.70 🔨

Change changelog typos

Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>

deps: drop serde feature from url

actually, remove rustc-workspace-hack dependency too

[`wildcard_imports`] Modules that contain `prelude` are also allowed

This commit fixes rust-lang#10846 by checking if the path segment contains the
word "prelude".

Signed-off-by: Charalampos Mitrodimas <charmitro@gmail.com>

fix issues 10836

change booleans file and update tests

Remove lint name and category fields from the new lint issue form

new lint: `missing_field_in_debug`

move some strings into consts, more tests

s/missing_field_in_debug/missing_fields_in_debug

dont trigger in macro expansions

make dogfood tests happy

minor cleanups

replace HashSet with FxHashSet

replace match_def_path with match_type

if_chain -> let chains, fix markdown, allow newtype pattern

fmt

consider string literal in `.field()` calls as used

don't intern defined symbol, remove mentions of 'debug_tuple'

special-case PD, account for field access through `Deref`

don't lint enums, update note in lint description

Explain which paths clippy searches for configuration in docs

Explain path-search using a list

Add spans to `clippy.toml` error messages

Bump nightly version -> 2023-06-02

Bump Clippy version -> 0.1.72

add checking for cfg(features = ...)

Update *Current stable* text in `CHANGELOG.md`

Refresh Lint Configuration's looks

emit `unnecessary_cast` on raw pointers as well

ok

actually appease CI

I should always run cargo test before committing 😅

add generics in test

also ensure generics with the same type are linted

Use URL parameters for filter states

This retains the settings during browser navigation and allows sharing links with additional configuration.

Handle back/forward when using URL parameters for filter states

Clippy Lints page - Delay updating of the URL in response to search input

Update on blur, enter keypress, and a debounced delay of 1000 ms.

This keeps the URL updated, but not distractingly so.

Clippy Lints page - Do not show groups in URL parameters if reset to defaults

Clippy Lints page - Fix path watch triggering

Clippy Lints page - Do not show filters in URL if configured as default values

only lint when `cast_from` and `cast_to`'s ty are the same

weird

manual_let_else: only add () around PatKind::Or at the top level

At the top level, () are required, but on the levels below they are not.

Support multi-binding situations as well as tuple patterns

Support struct patterns

new lint: `explicit_into_iter_fn_arg`

dogfood

update docs, simplify arg->param map, dont lint on chain

merge `explicit_into_iter_fn_arg` into `useless_conversion`

fix new failing proc macro tests

add plural form to useless_conversion if depth > 0

Add lint to check lint formulation messages

Fix lints that don't conform to the standard formulation

refactor(test): Move attribute to lint level

Fix suggestion on fully qualified syntax

ignore `Foo::deref` altogether

Add from_over_into replace for type in `Self` reference

Ignore from_over_into if it contains Self

Move bail into lint to prevent no-linting, move to unfixable

don't lint `allow_attributes` on attributes from proc macros

foiled again (forgot to run cargo test)

Fix `attr_search_pat` for `#[cfg_attr]`

remove tuple

add test for `?` desugaring

Update allow_attributes_without_reason.rs

`to_xx_bytes` implemented, `from_xx_bytes` todo

Mentioned in rust-lang#10765

implement `host_endian_bytes` and the other two

weird grammar

refine output

unidiomatic `if_chain!`

don't allocate the names

use enum for `prefix` instead of `&str`

Update endian_bytes.rs

derive Copy/PartialEq for `Prefix`

Remove `CARGO_UNSTABLE_SPARSE_REGISTRY` env from ci

It is now the default to use the sparse registry

Move redundant_clone to nursery

Add a test that checks for old style test headers

[`unnecessary_lazy_eval`]: don't lint on types with deref impl

Bring up Rust lang #37612 as a known problem for let_and_return

Compact issue link

Co-authored-by: Takayuki Nakata <f.seasons017@gmail.com>

Add redundant type annotations lint

Move `redundant_type_annotations` to restriction

Extract common logic to function

Add support to returned refs from `MethodCall`

Add `Limitations` section

make cast_possible_wrap not lint on conversions for sizes that cannot wrap, and make it work correctly for 16 bit {u,i}size

add more info link

Fix rust-lang#10498

Use type snippet instead of init expr for proc macro check

check for `_` instead

account for autoderef in eager_or_lazy

don't call `type_of` on generic params

Don't warn if there is a comment between else and curly bracket

make `useless_vec` smarter

allow the lint in a bunch of tests

don't allow `as_slice` for now

Adds new lint `arc_with_non_send_or_sync`

Updating documentation and lint formatting.

Adding extra check to ignore generic args.

Swapping to matches macro.

handle RangeInclusive function desugar

actually don't lint for inclusive range

Fix `useless_vec` suggestion in `for _ in vec![..]`

Ignore more pointer types in `unnecessary_cast`

check that the adjusted receiver type matches target

add the `excessive_*` style lints

change it to nursery category

add `excessive_nesting`

Close code block in example

couple more notes

decided against reinventing the wheel

check non-inline modules, ignore all macros

work with lint attributes

move to `complexity` but don't lint by default

Check if from proc macro and better tests

remove revisions

fix rust-lang#10776

actually fix it

also lint single expression blocks

Update mixed_read_write_in_expression.rs

Update diverging_sub_expression.stderr

ensure there are no stmts for expr check

refactor

Update excessive_nesting.rs

Update excessive_nesting.rs

allow disabling module inception on private modules

allow disabling module inception on private modules

Direct towards late passes in `cargo dev new_lint`

handle exponent without digits

add test

ignore more type aliases in unnecessary_cast

ignore more type aliases in unnecessary_cast

Update unnecessary_cast.stderr

Add `needless_if` lint

make cargo test pass

add description

add description

don't lint on `if let`

don't lint on `if let`

Update needless_if.fixed

Stop visiting once it's found `Let`

Extend `explicit_iter_loop` to all types

Split `for_loops` tests

Fix `explicit_into_iter_loop` with mutable references

Reborrow mutable references in `explicit_iter_loop`

Fix rust-lang#10504, don't lint on derived code

refactor

Update trait_bounds.rs

`ty_search_pat`

`impl WithSearchPat for Ty`

Update check_proc_macro.rs

Add lint `single_letter_idents`

rename the lint

make cargo test pass + example

ignore generics and allow arbitrary threshold

make it work for locals as well

oopos

add to tests and configuration

`cargo collect-metadata`

refactor and add link to issue

new lint: `large_stack_frames`

`cargo dev update_lints`

fmt

use span_lint_and_note

rename "drawbacks" to "known issues"

make lint description easier to read, prevent ICE

fix rebase weirdness

update lint_configuration.md

Don't ling `as_conversions` in proc macros

[`useless_vec`]: detect unnecessary `vec![_]`

add- and fix existing tests

Add test code

Boilerplate for the new lint

Add hook

Add the lint to the lib

Implement the lint

Implement the lint for expect

Implement the suggestion

Recognize `Ok`

Recognize `unwrap_or` methods

Recognize `unwrap_or_else` method

Track init and unwrap of expr

Recognize `Err`

Support suggesting panics

Add more tests

Preserve type annotations when present

Fix all the other tests

Don't lint non-statement/faux empty `needless_if`s

Now `cargo collect-metadata` updates the `CHANGELOG.md`

Remove dead code in `needless_pass_by_value`

Fix `missing_const_for_fn` not checking `~const Destruct`

use trait solver instead; created spaghetti code

cleanup spaghetti code

remove unnecessary checks

remove `in_move`

[`needless_lifetimes`]' suggestion now points at the lifetimes

[`no_effect`]: suggest adding `return` if applicable

make cargo test pass

Revert "Make it `Unspecified`"

This reverts commit 7748630.

Make it `Unspecified`

[`map_unwrap_or`]: don't lint when referenced variable is moved

Ignore `main()` in `no_test` code fences

run `cargo dev fmt`

add main function to test itself

[`derivable_impls`]: don't lint if expr unsize-coerces

fmt

dogfood

fix internal lints

Add lint [`single_range_in_vec_init`]

refactor a bit

[`unnecessary_fold`]: suggest turbofish if necessary

get rid of unnecessary function pointer

move check_fold_with_op function out

from_over_into: Show suggestions for non-Self expanded paths

[`match_same_arms`]: don't lint if `non_exhaustive_omitted_patterns`

formatting :/

new lint: `drain_collect`

take into account reborrowing when inserting `&mut` in sugg

make clippy happy

add a description

add test case for not whole length, move sugg into variable

add lint [`needless_clone_impl`]

Update needless_impls.rs

rename lint and disallow `clone_from`

missing_panics_doc: pickup expect method

bless

address or allow clippy::missing_panics_doc in clippy-dev

merge test

improve grammer in comment sentence

Co-authored-by: dswij <dharmasw@outlook.com>

Refactor to make following commit pass single_match_else lint

Make `--explain` subcommand return 1 for missing lints

Ignore more type aliases in `unnecessary_cast`

Adapt versions.html file to cleaned up gh-pages

Fix version.py after deleting v* dirs

I missed updating this file.

I also ran black and isort over it.

Adding configuration to allow safety comment above stmt containing unsafe block

Addressing reviewer comments

adding all ui tests to the configuration test as well

Collecting metadata

Exlude `todo!()` from `missing_panics_in_doc`

`missing_panics_in_doc` bless test and add additional macro testcase

new lint `single_call_fn`

add test for closures

Ignore functions annotated with `#[test]`

Fix `find_format_arg_expr` when incremental compilation is enabled

Fix rust-lang#10792

Dogfood

Fix false positive of [self_named_module_files] and [mod_module_files]

Move continue into if statement

Co-authored-by: Catherine <114838443+Centri3@users.noreply.github.com>

[`redundant_closure_call`]: handle nested closures

fix docs

don't unnecessarily walk more in visitor and add more tests

Ignore in-proc-macros items

use PlaceRef abstractions

add non-test-case for suggesting const on functions accessing union fields

allow safety comment above attributes

[`single_match`]: don't lint if block contains comments

add test for block comment and add note to description

Don't lint `excessive_precision` on inf

Add WebAssembly to allowed idents

add WebAssembly to test

[`borrow_as_ptr`]: Ignore temporaries

use rustc's criteria for a temporary

Don't lint `iter_nth_zero` in `next`

include a ref if argument is not just a numeric literal

use let chains, move assignments out of block, add tests

declare needs_ref later

[`type_repetition_in_bounds`]: respect msrv for combining maybe bounds

put issue link between <>

rename MSRV alias, add MSRV to lint doc

update lint configuration

Don't lint `ptr_arg` when return type uses Cow's lifetime

[`format_push_string`]: look through match, if, if-let

Avoid linting on procedural macros

Lint `mem_forget` if fields are `Drop`

move to `drop_forget_ref`

make note less verbose

Check if `if` conditions always evaluate to true in `never_loop`

update changelog's data ranges

Port clippy away from compiletest to ui_test

Update tests

Find the right `cargo-clippy` binary in CI

Don't lint code from external macros

add `needless_raw_string_hashes` lint

add semicolon in doctest

new lint `needless_raw_string` + refactor a bit

Thanks, #112373, for the snippet at line 75!

Update raw_strings.rs

don't lint `needless_raw_string_hashes` when it's unnecessary

change category and refactor

Update raw_strings.rs

Revert "new lints for visibility"

This reverts commit 0e5a537.

new lints for visibility

Fix compile-test under cargo nextest

Add BLESS for compile-test and some cleanup

new lint: `manual_range_pattern`

manual_range_pattern -> manual_range_patterns

Use substring matching for TESTNAME

new lints for visibility

Change category and update to `ui_test`

[`unused_async`]: don't lint on async trait impls

move `is_in_trait_method` to utils and rename

[`option_if_let_else`]: suggest `.as_ref()` if `&Option<_>`

allow dead code in the test

[`question_mark`]: don't lint inside of `try` block

lint in nested bodies if `try` is in outer body

suggests `is_some_and` over `map().unwrap_or(false)`

changed the msrv to 1.70 to suggest `is_some_and`

if the msrv is not >= 1.70 then the `map_or` is suggested instead of `is_some_and` (even when `unwrap_or` returns false)

now passes dogfood by wrapping unwrap_recv and unwrap_arg into a tuple

was previously failing due to `check` having to many arguments.

Revert "now passes dogfood by wrapping unwrap_recv and unwrap_arg into a tuple"

This reverts commit 7b91844.

ignore too_many_arguments on `check`

changed msrv name for consistency & changed nested if for style

updated list of lints that use msrv

ran `cargo collect-metadata`

New lint [`redundant_rest_pattern`]

Rename the lint

Add note to remove `if` statement altogether

Fix rust-lang#10413

Dogfood

Bump nightly version -> 2023-06-29

Make `eq_op` suggest `.is_nan()`

New lint `tuple_array_conversions`

Add msrv check and make test pass

Fix FP

heavily refactor

New lint `manual_try_fold`

Add msrv tests

Typo

update docs

address comments

Fix typos

Use `cargo build --tests` in CI

let_and_return: lint 'static lifetimes, don't lint borrows in closures

Add `SPEEDTEST`

Fix dogfood

Finally fix dogfood

[`missing_fields_in_debug`]: make sure `self` is an adt

new lint: `type_id_on_box`

that was definitely not the right version

add it to the methods lint pass

add a few more test cases

s/is_dyn_trait/is_dyn_any

[`arc_with_non_send_sync`]: look for nested type parameters

[`useless_vec`]: use the source span

Don't lint manual_let_else in cases where the question mark operator would work

Also, lint question_mark for `let...else` clauses that can be simplified to use `?`.
This lint isn't perfect as it doesn't support the unstable try blocks.

Fix the now stricter lint in manual_rem_euclid.rs

Put into one pass

Don't suppress manual_let_else if question_mark is allowed

If question_mark is allowed, there is no overlap any more,
so we can just not suppress it.

Move pat_and_expr_can_be_question_mark into clippy_utils

Fix FP [`needless_raw_string_hashes`]

[`useless_vec`]: add more tests for macro combinations

new lint: `read_line_without_trim`

add test cases for u32, f32, bool, String

Fix regex lints for regex 1.9.0

arc_with_non_send_sync: reword and move to suspicious

Pass correct substs to `implements_trait` in `incorrect_impls`

`Copy<T>` does in fact not exist. The substs on the trait_ref contain
the `Self` type of the impl as the first parameter, so passing that
to `implements_trait`, which then nicely prepends the `Self` type
for us does not end will.

Fix changelog PR listings, create them automatically in `fetch_prs_between.sh`

implement `manual_partial_ord_impl`

first try at this

rename to `manual_partial_ord_and_ord_impl`

cargo dev fmt

cargo test passes

cargo test passes

refactor a lil

Update bool_comparison.stderr

heavily refactor + bump `clippy::version`

refactor

refactor

check bounds to increase accuracy, and add todos

use `other` instead of `self`

refactor

`manual_float_methods`

Make suggestion give multiple alternatives

Refactor, remove `Constant::to_bits`

[significant_drop_tightening] Fix rust-lang#11128

Dogfood

Add test for rust-lang#10535

Fix rust-lang#10535

Add needless_pass_by_ref lint

Add UI test for `needless_pass_by_ref_mut`

Update UI tests with new `needless_pass_by_ref_mut` lint

Fix warnings of `needless_pass_by_ref_mut` in clippy

Add warning for `NEEDLESS_PASS_BY_REF_MUT` lint about the fact that it changes API

Add warning about semver compatibility if it's a public function

"try this" -> "try"

[`unnecessary_literal_unwrap`]: don't lint if binding initializer is expn

[`manual_range_patterns`]: lint negative values

[`manual_range_patterns`]: document what range we don't lint

changelog: Fix typo in `needless_pass_by_ref_mut` lint description

adjust applicability and suggest making binding mutable

Use depinfo to discover UI test dependencies

[`unnecessary_literal_unwrap`]: lint `unwrap_unchecked`

[`unnecessary_literal_unwrap`]: also handle unwrap_err_unchecked

Update version attribute for 1.71 lints

Changelog for Rust 1.71 👑

Changelog: Add disclaimer about the new format

[`panic_in_result_fn`] remove `todo!`, `unimplemented!`, `unreachable!`

This commit fixes rust-lang#11025 by removing checks for `todo!`,
`unimplemented!` and `unreachable!`.

Signed-off-by: Panagiotis Foliadis <pfoliadis@hotmail.com>

Add "Known problems" section to `needless_borrow` documentation

[`tuple_array_conversions`]: move from `complexity` to `nursery`

Due to outstanding issues:
* rust-lang#11082
* rust-lang#11085
* rust-lang#11100 (rust-lang#11105)
* rust-lang#11124
* rust-lang#11144

[`arithmetic_side_effect`]: allow different rhs type

Add `imports_granularity = "Module"` to rustfmt.toml

Trigger a rebuild when CLIPPY_CONF_DIR changes

Set `unnecessary_cast` suggestion to `MaybeIncorrect` for pointer casts

Removing casts may cause type inference to stop working which requires
manual intervention

Bump Clippy version -> 0.1.73

Bump nightly version -> 2023-07-14

renamed lint
  • Loading branch information
ofeeg committed Aug 15, 2023
1 parent 3d3c8b6 commit 0e94b16
Show file tree
Hide file tree
Showing 193 changed files with 1,984 additions and 820 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ document.
## Unreleased / Beta / In Rust Nightly

<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
[435a8ad8...master](https://github.com/rust-lang/rust-clippy/compare/435a8ad8...master)

## Rust 1.71
Expand Down Expand Up @@ -238,6 +241,7 @@ Current stable, released 2023-06-01
[#10592](https://github.com/rust-lang/rust-clippy/pull/10592)
* Fixed a deserialization error for the `array-size-threshold` config value
[#10423](https://github.com/rust-lang/rust-clippy/pull/10423)
<<<<<<< HEAD

## Rust 1.69

Expand All @@ -246,13 +250,19 @@ Released 2023-04-20
[View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-01-13T06%3A12%3A46Z..2023-02-25T23%3A48%3A10Z+base%3Amaster)
=======
[149392b0...master](https://github.com/rust-lang/rust-clippy/compare/149392b0...master)
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
## Rust 1.69

Current stable, released 2023-04-20
Released 2023-04-20

<<<<<<< HEAD
[7f27e2e7...149392b0](https://github.com/rust-lang/rust-clippy/compare/7f27e2e7...149392b0)
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
[View all 72 merged pull requests](https://github.com/rust-lang/rust-clippy/pulls?q=merged%3A2023-01-13T06%3A12%3A46Z..2023-02-25T23%3A48%3A10Z+base%3Amaster)
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
### New Lints

Expand Down
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[package]
name = "clippy"
<<<<<<< HEAD
<<<<<<< HEAD
version = "0.1.73"
=======
version = "0.1.71"
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
version = "0.1.73"
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
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 @@ -32,10 +36,14 @@ termize = "0.1"

[dev-dependencies]
<<<<<<< HEAD
<<<<<<< HEAD
ui_test = "0.11.5"
=======
compiletest_rs = { version = "0.10", features = ["tmp"] }
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
ui_test = "0.11.5"
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
tester = "0.9"
regex = "1.5"
toml = "0.7.3"
Expand Down
61 changes: 60 additions & 1 deletion book/src/lint_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ This file is generated by `cargo collect-metadata`.
Please use that command to update the file and do not edit it by hand.
-->

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
## Lint Configuration Options
Expand Down Expand Up @@ -134,6 +135,9 @@ Please use that command to update the file and do not edit it by hand.
| [unnecessary-box-size](#unnecessary-box-size) | `128` |
>>>>>>> e4f5d83fa (Fixed formatting.)
>>>>>>> 4da6e7e06 (rebase attempt)
=======
# Lint Configuration Options
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
The following list shows each configuration option, along with a description, its default value, an example
and lints affected.
Expand Down Expand Up @@ -360,15 +364,20 @@ default configuration of Clippy. By default, any configuration will replace the
* [`disallowed_names`](https://rust-lang.github.io/rust-clippy/master/index.html#disallowed_names)


<<<<<<< HEAD
<<<<<<< HEAD
## `semicolon-inside-block-ignore-singleline`
=======
### semicolon-inside-block-ignore-singleline
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
## `semicolon-inside-block-ignore-singleline`
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
Whether to lint only if it's multiline.

**Default Value:** `false` (`bool`)

<<<<<<< HEAD
<<<<<<< HEAD
---
**Affected lints:**
Expand All @@ -382,10 +391,19 @@ Whether to lint only if it's multiline.

### semicolon-outside-block-ignore-multiline
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
---
**Affected lints:**
* [`semicolon_inside_block`](https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_inside_block)


## `semicolon-outside-block-ignore-multiline`
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
Whether to lint only if it's singleline.

**Default Value:** `false` (`bool`)

<<<<<<< HEAD
<<<<<<< HEAD
---
**Affected lints:**
Expand All @@ -399,6 +417,14 @@ Whether to lint only if it's singleline.

### doc-valid-idents
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
---
**Affected lints:**
* [`semicolon_outside_block`](https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_outside_block)


## `doc-valid-idents`
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
The list of words this lint should not consider as identifiers needing ticks. The value
`".."` can be used as part of the list to indicate, that the configured values should be appended to the
default configuration of Clippy. By default, any configuration will replace the default value. For example:
Expand Down Expand Up @@ -884,6 +910,7 @@ The maximum byte size a `Future` can have, before it triggers the `clippy::large
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> a1b75c510 (Merge commit 'a3ed905928a03b6e433d0b429190bf3a847128b3' into clippyup)
=======
Expand All @@ -892,22 +919,47 @@ The maximum byte size a `Future` can have, before it triggers the `clippy::large
=======
=======
>>>>>>> 4da6e7e06 (rebase attempt)
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
## `unnecessary-box-size`
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 203e87518 (`cargo collect-metadata`)
<<<<<<< HEAD
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
The byte size a `T` in `Box<T>` can have, below which it triggers the `clippy::unnecessary_box` lint
=======
### unnecessary-box-size
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
The byte size a `T` in `Box<T>` can have, below which it triggers the `clippy::unnecessary_box` lint
**Default Value:** `128` (`u64`)

* [unnecessary_box_returns](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_returns)
---
**Affected lints:**
* [`unnecessary_box_returns`](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_box_returns)
<<<<<<< HEAD
<<<<<<< HEAD

=======
>>>>>>> b7a605471 (Refresh Lint Configuration's looks)
=======

>>>>>>> 203e87518 (`cargo collect-metadata`)
## `allow-private-module-inception`
Whether to allow module inception if it's not public.

**Default Value:** `false` (`bool`)

---
**Affected lints:**
* [`module_inception`](https://rust-lang.github.io/rust-clippy/master/index.html#module_inception)


<<<<<<< HEAD
>>>>>>> e4f5d83fa (Fixed formatting.)
**Default Value:** `128` (`u64`)
Expand Down Expand Up @@ -950,6 +1002,13 @@ the list to indicate, that the configured values should be appended to the defau
configuration of Clippy. By default, any configuration will replace the default value.
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
=======
## `allowed-idents-below-min-chars`
Allowed names below the minimum allowed characters. The value `".."` can be used as part of
the list to indicate, that the configured values should be appended to the default
configuration of Clippy. By default, any configuration will replace the default value.

>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
**Default Value:** `{"j", "z", "i", "y", "n", "x", "w"}` (`rustc_data_structures::fx::FxHashSet<String>`)
---
Expand Down
5 changes: 5 additions & 0 deletions clippy_dev/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,16 @@ pub fn clippy_project_root() -> PathBuf {
panic!("error: Can't determine root of project. Please run inside a Clippy working dir.");
}

<<<<<<< HEAD
<<<<<<< HEAD
/// # Panics
/// Panics if given command result was failed.
=======
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
/// # Panics
/// Panics if given command result was failed.
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
pub fn exit_if_err(status: io::Result<ExitStatus>) {
match status.expect("failed to run command").code() {
Some(0) => {},
Expand Down
4 changes: 4 additions & 0 deletions clippy_lints/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[package]
name = "clippy_lints"
<<<<<<< HEAD
<<<<<<< HEAD
version = "0.1.73"
=======
version = "0.1.71"
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
version = "0.1.73"
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
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
6 changes: 6 additions & 0 deletions clippy_lints/src/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,9 @@ impl_lint_pass!(EarlyAttributes => [
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
=======
NON_MINIMAL_CFG,
<<<<<<< HEAD
Expand All @@ -744,8 +747,11 @@ impl_lint_pass!(EarlyAttributes => [
=======
MAYBE_MISUSED_CFG,
>>>>>>> ad76687b2 (add checking for cfg(features = ...))
<<<<<<< HEAD
=======
>>>>>>> e4f5d83fa (Fixed formatting.)
=======
>>>>>>> 0d78a528d (Entered supposed changes, ran cargo dev fmt, test, and bless.)
]);

impl EarlyLintPass for EarlyAttributes {
Expand Down
1 change: 0 additions & 1 deletion clippy_lints/src/borrow_deref_ref.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::reference::DEREF_ADDROF;
use clippy_utils::diagnostics::span_lint_and_then;
use clippy_utils::is_from_proc_macro;
use clippy_utils::source::snippet_opt;
use clippy_utils::ty::implements_trait;
use clippy_utils::{get_parent_expr, is_from_proc_macro, is_lint_allowed};
Expand Down
Loading

0 comments on commit 0e94b16

Please sign in to comment.