]> git.lizzy.rs Git - rust.git/log
rust.git
18 months agoAuto merge of #9826 - Veykril:semi-blocks, r=Alexendoo
bors [Fri, 9 Dec 2022 11:41:24 +0000 (11:41 +0000)]
Auto merge of #9826 - Veykril:semi-blocks, r=Alexendoo

Add semicolon-outside/inside-block lints

changelog: Add `semicolon_outside_block` and `semicolon_inside_block` lints

Fixes https://github.com/rust-lang/rust-clippy/issues/7322

An earlier attempt at this can be found here https://github.com/rust-lang/rust-clippy/pull/7564. This PR still implements two separate lints but I am open to merging them into a single one that's configurable.

18 months agoAuto merge of #9840 - c410-f3r:arith-2, r=Alexendoo
bors [Fri, 9 Dec 2022 11:27:15 +0000 (11:27 +0000)]
Auto merge of #9840 - c410-f3r:arith-2, r=Alexendoo

[`arithmetic-side-effects`]: Consider user-provided pairs

Depends on https://github.com/rust-lang/rust-clippy/pull/9592.

Because of https://github.com/rust-lang/rust-clippy/pull/9559#discussion_r985293523, r? `@Alexendoo`

```
changelog: [`arithmetic-side-effects`]: Consider user-provided pairs
```

18 months ago[arithmetic-side-effects]: Consider user-provided pairs
Caio [Thu, 8 Dec 2022 20:41:49 +0000 (17:41 -0300)]
[arithmetic-side-effects]: Consider user-provided pairs

18 months agoAuto merge of #10046 - flip1995:ci-i386, r=xFrednet
bors [Wed, 7 Dec 2022 12:17:52 +0000 (12:17 +0000)]
Auto merge of #10046 - flip1995:ci-i386, r=xFrednet

CI: Don't install no longer needed dependencies on i386

changelog: none

closes #10040

18 months agoDon't install dependencies on i386
Philipp Krones [Wed, 7 Dec 2022 11:30:13 +0000 (12:30 +0100)]
Don't install dependencies on i386

18 months agoRevert "Use ubuntu-20.04 instead of ubuntu-latest"
Philipp Krones [Wed, 7 Dec 2022 11:29:13 +0000 (12:29 +0100)]
Revert "Use ubuntu-20.04 instead of ubuntu-latest"

This reverts commit f170b1f01ab9e5faabc9c9b0080065603033b4c0.

18 months agoAuto merge of #10036 - rust-lang:flip1995/labels, r=xFrednet
bors [Tue, 6 Dec 2022 19:09:24 +0000 (19:09 +0000)]
Auto merge of #10036 - rust-lang:flip1995/labels, r=xFrednet

Add beta-nominated label to triagebot

Also non-maintainers should be able to label PRs with `beta-nominated`.

changelog: none

18 months agoAuto merge of #10023 - Jarcho:issue_10017, r=xFrednet
bors [Tue, 6 Dec 2022 18:57:05 +0000 (18:57 +0000)]
Auto merge of #10023 - Jarcho:issue_10017, r=xFrednet

Fix `zero_ptr` suggestion for `no_std` crates

fixes #10017

---

changelog: Sugg: [`zero_ptr`]: Now suggests `core::` paths for `no_std` crates
[#10023](https://github.com/rust-lang/rust-clippy/pull/10023)

18 months agoAuto merge of #9920 - naosense:suppress_lint_in_const, r=xFrednet
bors [Tue, 6 Dec 2022 18:43:28 +0000 (18:43 +0000)]
Auto merge of #9920 - naosense:suppress_lint_in_const, r=xFrednet

add `suppress_restriction_lint_in_const` config

According to #9808 , add a new lint `suppress_lint_in_const` to report even in const context. BTW, i am not good at naming either, if anyone have a better idea, i am happy to change it.

This PR is still in progress, so i keep it draft.

- \[x] Followed [lint naming conventions][lint_naming]
- \[x] Added passing UI tests (including committed `.stderr` file)
- \[x] `cargo test` passes locally
- \[x] Executed `cargo dev update_lints`
- \[x] Added lint documentation
- \[x] Run `cargo dev fmt`

changelog: Enhancement: [`indexing_slicing`]: add new config `suppress-restriction-lint-in-const` to enable restriction lints, even if the suggestion might not be applicable

r? `@xFrendet`

18 months agoAuto merge of #10039 - xFrednet:00000-travel-back-in-ubuntu-time, r=dswij
bors [Tue, 6 Dec 2022 18:30:58 +0000 (18:30 +0000)]
Auto merge of #10039 - xFrednet:00000-travel-back-in-ubuntu-time, r=dswij

Use ubuntu-20.04 instead of ubuntu-latest

changelog: none

r? `@ghost`

I'll create an issue, to undo this change, once the CI passes on `ubuntu-latest` again

18 months agoUse ubuntu-20.04 instead of ubuntu-latest
xFrednet [Tue, 6 Dec 2022 18:13:53 +0000 (19:13 +0100)]
Use ubuntu-20.04 instead of ubuntu-latest

18 months agoAdd beta-nominated label to triagebot
Philipp Krones [Tue, 6 Dec 2022 08:47:59 +0000 (09:47 +0100)]
Add beta-nominated label to triagebot

Also non-maintainers should be able to label PRs with `beta-nominated`.

18 months agoAdd test case for blocks with semicolon inside and outside a block
Lukas Wirth [Mon, 5 Dec 2022 10:02:10 +0000 (11:02 +0100)]
Add test case for blocks with semicolon inside and outside a block

18 months agoAuto merge of #10027 - smoelius:fix-10021, r=dswij
bors [Sun, 4 Dec 2022 01:58:43 +0000 (01:58 +0000)]
Auto merge of #10027 - smoelius:fix-10021, r=dswij

Fix 10021

This PR proposes a fix for #10021.

The problem is similar to the one that `@mikerite` described in #9505. The compiler is generating an empty substitution for a call, even though the type of `Self` seems to be needed for a predicate. In `@mikerite's` case, the call was to [`IntoFuture::into_future`](https://doc.rust-lang.org/std/future/trait.IntoFuture.html#tymethod.into_future). In this case, the call is to [`Try::branch`](https://doc.rust-lang.org/std/ops/trait.Try.html#tymethod.branch).

The proposed fix is to verify that the parameter whose type is changing has an index within the substitution. The strikes me as a reasonable approach, since if the check were to fail, the following code would be a no-op:

https://github.com/rust-lang/rust-clippy/blob/4c123a06ba3c2ec17d3a4dfa251dccdc5368b712/clippy_lints/src/methods/unnecessary_to_owned.rs#L420-L428

Like `@mikerite's` original solution, this solution turns ICEs into false negatives.

changelog: fix `unnecessary_to_owned` false positive involving `Try::branch`

18 months agofix test
naosense [Mon, 28 Nov 2022 09:40:00 +0000 (17:40 +0800)]
fix test

18 months agoFix #10021
Samuel Moelius [Sat, 3 Dec 2022 01:41:29 +0000 (20:41 -0500)]
Fix #10021

18 months agoAdd test for #10021
Samuel Moelius [Sat, 3 Dec 2022 01:39:38 +0000 (20:39 -0500)]
Add test for #10021

18 months agoFix `zero_ptr` suggestion for `no_std` crates
Jason Newcomb [Fri, 2 Dec 2022 04:29:47 +0000 (23:29 -0500)]
Fix `zero_ptr` suggestion for `no_std` crates

18 months agoAuto merge of #10026 - samueltardieu:missing-slash, r=flip1995
bors [Fri, 2 Dec 2022 16:27:29 +0000 (16:27 +0000)]
Auto merge of #10026 - samueltardieu:missing-slash, r=flip1995

Add missing slash to produce function documentation

changelog: none

18 months agoAdd missing slash to produce function documentation
Samuel Tardieu [Fri, 2 Dec 2022 15:26:15 +0000 (16:26 +0100)]
Add missing slash to produce function documentation

18 months agoAuto merge of #10022 - Jarcho:issue_10019, r=giraffate
bors [Fri, 2 Dec 2022 07:17:13 +0000 (07:17 +0000)]
Auto merge of #10022 - Jarcho:issue_10019, r=giraffate

Don't lint `implicit_clone` when the type doesn't implement clone

fixes #10019
changelog: `implicit_clone`: Don't lint when the type doesn't implement clone

18 months agoAuto merge of #9962 - mdgaziur:master, r=dswij
bors [Fri, 2 Dec 2022 05:49:26 +0000 (05:49 +0000)]
Auto merge of #9962 - mdgaziur:master, r=dswij

Fix #9958

This PR fixes #9958. In order to fix the issue, the lint will now peel reference operators and enclose the expression with parentheses when necessary.

changelog: [`comparison_to_empty`]: Peel deref operators in suggestions when necessary

18 months agoAuto merge of #9982 - Jarcho:issue_9935, r=flip1995
bors [Fri, 2 Dec 2022 04:31:55 +0000 (04:31 +0000)]
Auto merge of #9982 - Jarcho:issue_9935, r=flip1995

Don't lint `from_over_into` for opaque types

fixes #9935

This is stalled until the next sync. The impl in question can't be written on the pinned nightly.

changelog: Don't lint `from_over_into` for opaque types

18 months agoDon't lint `implicit_clone` when the type doesn't implement clone
Jason Newcomb [Fri, 2 Dec 2022 04:05:53 +0000 (23:05 -0500)]
Don't lint `implicit_clone` when the type doesn't implement clone

18 months agoAuto merge of #10013 - Jarcho:issue_9886, r=Manishearth
bors [Thu, 1 Dec 2022 22:49:40 +0000 (22:49 +0000)]
Auto merge of #10013 - Jarcho:issue_9886, r=Manishearth

Don't lint `manual_assert` in `else if`

fixes #9886
changelog: `manual_assert`: Don't lint in `else if`

18 months agoDon't lint `manual_assert` in `else if`
Jason Newcomb [Thu, 1 Dec 2022 17:30:19 +0000 (12:30 -0500)]
Don't lint `manual_assert` in `else if`

18 months agoAuto merge of #10008 - Jarcho:issue_9882, r=Manishearth
bors [Thu, 1 Dec 2022 22:37:15 +0000 (22:37 +0000)]
Auto merge of #10008 - Jarcho:issue_9882, r=Manishearth

Treat custom enum discriminant values as constants

fixes #9882
changelog: All lints: Don't lint in enum discriminant values when the suggestion won't work in a const context

18 months agoAuto merge of #10006 - Jarcho:issue_9890, r=Manishearth
bors [Thu, 1 Dec 2022 22:25:38 +0000 (22:25 +0000)]
Auto merge of #10006 - Jarcho:issue_9890, r=Manishearth

Don't suggest removing `mut` from references in `redundant_static_lifetimes`

fixes #9890
changelog: `redundant_static_lifetimes`: Don't suggest removing `mut` from references

18 months agoAuto merge of #9966 - alex-semenyuk:manual_let_else_paren, r=xFrednet
bors [Thu, 1 Dec 2022 22:11:01 +0000 (22:11 +0000)]
Auto merge of #9966 - alex-semenyuk:manual_let_else_paren, r=xFrednet

Fix manual_let_else produces a wrong suggestion with or-patterns

Fix #9938
changelog: Sugg: [`manual_let_else`]: Suggestions for or-patterns now include required brackets.
[#9966](https://github.com/rust-lang/rust-clippy/pull/9966)

18 months agoAuto merge of #10012 - Jarcho:issue_9885, r=Alexendoo
bors [Thu, 1 Dec 2022 20:26:46 +0000 (20:26 +0000)]
Auto merge of #10012 - Jarcho:issue_9885, r=Alexendoo

Don't lint `string_lit_as_bytes` in match scrutinees

fixes #9885
changelog: `string_lit_as_bytes`: Don't lint in match scrutinees

18 months agoDon't lint `string_lit_as_bytes` in match scrutinees
Jason Newcomb [Thu, 1 Dec 2022 17:17:38 +0000 (12:17 -0500)]
Don't lint `string_lit_as_bytes` in match scrutinees

18 months agoFix manual_let_else produces a wrong suggestion with or-patterns
alex-semenyuk [Sat, 26 Nov 2022 16:21:07 +0000 (19:21 +0300)]
Fix manual_let_else produces a wrong suggestion with or-patterns

19 months agoDon't lint `from_over_into` for opaque types
Jason Newcomb [Tue, 29 Nov 2022 05:20:53 +0000 (00:20 -0500)]
Don't lint `from_over_into` for opaque types

19 months agoAuto merge of #10010 - flip1995:rustup, r=flip1995
bors [Thu, 1 Dec 2022 13:21:51 +0000 (13:21 +0000)]
Auto merge of #10010 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

changelog: none

19 months agoBump nightly version -> 2022-12-01
Philipp Krones [Thu, 1 Dec 2022 11:55:29 +0000 (12:55 +0100)]
Bump nightly version -> 2022-12-01

19 months agoMerge remote-tracking branch 'upstream/master' into rustup
Philipp Krones [Thu, 1 Dec 2022 11:39:42 +0000 (12:39 +0100)]
Merge remote-tracking branch 'upstream/master' into rustup

19 months agoAuto merge of #10007 - Jarcho:issue_10005, r=giraffate
bors [Thu, 1 Dec 2022 07:20:06 +0000 (07:20 +0000)]
Auto merge of #10007 - Jarcho:issue_10005, r=giraffate

Fix ICE in `result_large_err` with uninhabited enums

fixes #10005
changelog: `result_large_err`: Fix ICE with uninhabited enums

19 months agoTreat custom enum discriminant values as constants
Jason Newcomb [Thu, 1 Dec 2022 03:34:42 +0000 (22:34 -0500)]
Treat custom enum discriminant values as constants

19 months agoFix ICE in `result large_err` with uninhabited enums
Jason Newcomb [Thu, 1 Dec 2022 02:44:18 +0000 (21:44 -0500)]
Fix ICE in `result large_err` with uninhabited enums

19 months agoDon't suggest removing `mut` from references in `redundant_static_lifetimes`
Jason Newcomb [Thu, 1 Dec 2022 02:29:48 +0000 (21:29 -0500)]
Don't suggest removing `mut` from references in `redundant_static_lifetimes`

19 months agoAuto merge of #9943 - dswij:pr-9940, r=Jarcho
bors [Wed, 30 Nov 2022 21:23:10 +0000 (21:23 +0000)]
Auto merge of #9943 - dswij:pr-9940, r=Jarcho

manual_let_else: keep macro call on suggestion blocks

Closes #9940

changelog: [`manual_let_else`]: Do not expand macro calls on suggestions

19 months agoAuto merge of #10001 - Jarcho:issue_9866, r=llogiq
bors [Wed, 30 Nov 2022 19:54:25 +0000 (19:54 +0000)]
Auto merge of #10001 - Jarcho:issue_9866, r=llogiq

Fix ICE in `unused_rounding`

fixes #9866
changelog: `unused_rounding`: Fix ICE when using the `_` separator

19 months agoAuto merge of #9996 - Jarcho:issue_9906, r=Alexendoo
bors [Wed, 30 Nov 2022 19:40:22 +0000 (19:40 +0000)]
Auto merge of #9996 - Jarcho:issue_9906, r=Alexendoo

Fix `unnecessary_cast` suggestion when taking a reference

fixes #9906
changelog: `unnecessary_cast`: Fix suggestion when taking a reference

19 months agoAuto merge of #9997 - Jarcho:issue_9901, r=llogiq
bors [Wed, 30 Nov 2022 19:29:40 +0000 (19:29 +0000)]
Auto merge of #9997 - Jarcho:issue_9901, r=llogiq

Don't lint `explicit_auto_deref` when the initial type is neither a reference, nor a receiver

fixes #9901
fixes #9777
changelog: `explicit_auto_deref`: Don't lint when the initial value is neither a reference, nor a receiver

19 months agoFix ICE in `unused_rounding`
Jason Newcomb [Wed, 30 Nov 2022 17:31:38 +0000 (12:31 -0500)]
Fix ICE in `unused_rounding`

19 months agoAuto merge of #9987 - Jarcho:issue_9957, r=flip1995
bors [Wed, 30 Nov 2022 16:31:56 +0000 (16:31 +0000)]
Auto merge of #9987 - Jarcho:issue_9957, r=flip1995

Don't cross contexts while building the suggestion for `redundant_closure_call`

fixes #9957

changelog: `redundant_closure_call`: Don't cross macro contexts while building the suggestion

19 months agoDon't lint `explicit_auto_deref` when the initial type is neither a reference, nor...
Jason Newcomb [Wed, 30 Nov 2022 16:15:49 +0000 (11:15 -0500)]
Don't lint `explicit_auto_deref` when the initial type is neither a reference, nor a receiver

19 months agoFix `unnecessary_cast` suggestion when taking a reference
Jason Newcomb [Wed, 30 Nov 2022 15:48:53 +0000 (10:48 -0500)]
Fix `unnecessary_cast` suggestion when taking a reference

19 months agoDon't cross contexts while building the suggestion for `redundant_closure_call`
Jason Newcomb [Tue, 29 Nov 2022 15:36:43 +0000 (10:36 -0500)]
Don't cross contexts while building the suggestion for `redundant_closure_call`

19 months agoFix #9958
mdgaziur [Sat, 26 Nov 2022 06:17:49 +0000 (12:17 +0600)]
Fix #9958

19 months agoAuto merge of #9989 - xFrednet:9986-move-safety-thingy, r=flip1995
bors [Wed, 30 Nov 2022 12:44:45 +0000 (12:44 +0000)]
Auto merge of #9989 - xFrednet:9986-move-safety-thingy, r=flip1995

Move `unnecessary_unsafety_doc` to `pedantic`

This lint was added in #9822. I like the idea, but also agree with #9986 as well. I think it should at least not be warn-by-default. This is one of these cases, where I'd like a group between pedantic and restriction. But I believe that users using `#![warn(clippy::pedantic)]` will know how to enable the lint if they disagree with it.

---

Since the lint is new:

changelog: none

r? `@flip1995` since I'd suggest back porting this, the original PR was merged 16 days ago.

Closes: #9986 (While it doesn't address everything, I believe that this is the best compromise)
19 months agoMove `unnecessary_unsafety_doc` to `pedantic`
xFrednet [Tue, 29 Nov 2022 17:22:02 +0000 (18:22 +0100)]
Move `unnecessary_unsafety_doc` to `pedantic`

19 months agoAuto merge of #104905 - compiler-errors:normalization-changes, r=spastorino
bors [Wed, 30 Nov 2022 11:13:09 +0000 (11:13 +0000)]
Auto merge of #104905 - compiler-errors:normalization-changes, r=spastorino

Some initial normalization method changes

1. Rename `AtExt::normalize` to `QueryNormalizeExt::query_normalize` (using the `QueryNormalizer`)
2. Introduce `NormalizeExt::normalize` to replace `partially_normalize_associated_types_in` (using the `AssocTypeNormalizer`)
3. Rename `FnCtxt::normalize_associated_types_in` to `FnCtxt::normalize`
4. Remove some unused other normalization fns in `Inherited` and `FnCtxt`

Also includes one drive-by where we're no longer creating a `FnCtxt` inside of `check_fn`, but passing it in. This means we don't need such weird `FnCtxt` construction logic.

Stacked on top of #104835 for convenience.

r? types

19 months agoUse `snippet_with_context` instead of `_with_macro_callsite`
dswij [Wed, 30 Nov 2022 06:50:13 +0000 (14:50 +0800)]
Use `snippet_with_context` instead of `_with_macro_callsite`

19 months agoAuto merge of #9985 - ehuss:triagebot-autolabel, r=xFrednet
bors [Tue, 29 Nov 2022 13:30:15 +0000 (13:30 +0000)]
Auto merge of #9985 - ehuss:triagebot-autolabel, r=xFrednet

Add S-waiting-on-review autolabel.

This adds the S-waiting-on-review autolabel feature for new PRs.  This was previously handled by highfive, but I neglected to include it in #9963.

changelog: none

19 months agoAdd S-waiting-on-review autolabel.
Eric Huss [Tue, 29 Nov 2022 13:18:43 +0000 (05:18 -0800)]
Add S-waiting-on-review autolabel.

19 months agoAuto merge of #9975 - xFrednet:0000-refutable-slice-pedantic, r=llogiq
bors [Tue, 29 Nov 2022 11:16:01 +0000 (11:16 +0000)]
Auto merge of #9975 - xFrednet:0000-refutable-slice-pedantic, r=llogiq

Move `index_refutable_slice` to `pedantic`

During the creation, I out this lint into the nursery group to let it run in the wild before moving it to a commonly used group. This move never happened until now, though. It should be safe, as Clippy and I have been using it for months and there are no open issues for is :)

---

changelog: Move `index_refutable_slice` to `pedantic` (Now warn-by-default)
[#9975](https://github.com/rust-lang/rust-clippy/pull/9975)

19 months agoAuto merge of #9981 - Jarcho:issue_9954, r=flip1995
bors [Tue, 29 Nov 2022 09:49:46 +0000 (09:49 +0000)]
Auto merge of #9981 - Jarcho:issue_9954, r=flip1995

Don't lint `unnecessary_operation` in mixed macro contexts

fixes #9954

changelog: `unnecessary_operation`: Don't lint in mixed macro contexts.

19 months agoAuto merge of #9980 - Jarcho:issue_9960, r=xFrednet
bors [Tue, 29 Nov 2022 09:10:14 +0000 (09:10 +0000)]
Auto merge of #9980 - Jarcho:issue_9960, r=xFrednet

Don't lint `unnecessary_cast` in mixed macro context

fixes #9960

Time to start making a dent in this onslaught.

changelog: `unnecessary_cast`: Don't lint when the identifiers context differs from its binding's context for locals

19 months agochange note style
naosense [Thu, 24 Nov 2022 01:43:11 +0000 (09:43 +0800)]
change note style

19 months agochange default value
naosense [Wed, 23 Nov 2022 08:50:05 +0000 (16:50 +0800)]
change default value

19 months agoresolve conflicts
naosense [Wed, 23 Nov 2022 08:43:42 +0000 (16:43 +0800)]
resolve conflicts

19 months agoupdate config and suggest
naosense [Wed, 23 Nov 2022 08:26:25 +0000 (16:26 +0800)]
update config and suggest

19 months agoadd test and stderr
naosense [Tue, 22 Nov 2022 09:12:50 +0000 (17:12 +0800)]
add test and stderr

19 months agoadd `suppress_lint_in_const` conf
naosense [Mon, 21 Nov 2022 06:36:56 +0000 (14:36 +0800)]
add `suppress_lint_in_const` conf

19 months agoDon't lint `unnecessary_cast` in mixed macro context
Jason Newcomb [Tue, 29 Nov 2022 04:30:56 +0000 (23:30 -0500)]
Don't lint `unnecessary_cast` in mixed macro context

19 months agoDon't lint `unnecessary_operation` in mixed macro contexts
Jason Newcomb [Tue, 29 Nov 2022 04:56:02 +0000 (23:56 -0500)]
Don't lint `unnecessary_operation` in mixed macro contexts

19 months agoMove `index_refutable_slice` to `pedantic`
xFrednet [Mon, 28 Nov 2022 19:23:09 +0000 (20:23 +0100)]
Move `index_refutable_slice` to `pedantic`

19 months agoFnCtxt normalization stuff
Michael Goulet [Fri, 25 Nov 2022 17:28:50 +0000 (17:28 +0000)]
FnCtxt normalization stuff

19 months agopartially_normalize_... -> At::normalize
Michael Goulet [Fri, 25 Nov 2022 17:11:15 +0000 (17:11 +0000)]
partially_normalize_... -> At::normalize

19 months agoAuto merge of #9865 - nyurik:allow-mixed, r=xFrednet
bors [Mon, 28 Nov 2022 17:22:36 +0000 (17:22 +0000)]
Auto merge of #9865 - nyurik:allow-mixed, r=xFrednet

Add allow-mixed-uninlined-format-args config

Implement `allow-mixed-uninlined-format-args` config param to change the behavior of the `uninlined_format_args` lint. Now it is a part of `style` per [Zulip chat](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60uninlined_format_args.60.20category), and won't propose inlining in case of a mixed usage, e.g. `print!("{} {}", var, 1+2)`. If the user sets `allow-mixed-uninlined-format-args` config param to `false`, the lint would behave like it did before -- proposing to inline args even in the mixed case.

---

changelog: [`uninlined_format_args`]: Added a new config `allow-mixed-uninlined-format-args` to allow the lint, if only some arguments can be inlined
[#9865](https://github.com/rust-lang/rust-clippy/pull/9865)
changelog: Moved [`uninlined_format_args`] to `style` (Now warn-by-default)
[#9865](https://github.com/rust-lang/rust-clippy/pull/9865)

19 months agoRollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkov
Matthias Krüger [Mon, 28 Nov 2022 16:25:46 +0000 (17:25 +0100)]
Rollup merge of #104804 - nnethercote:MetaItemLit, r=petrochenkov

Rename `ast::Lit` as `ast::MetaItemLit`.

And some other literal cleanups.

r? `@petrochenkov`

19 months agoAdjust description once more
Lukas Wirth [Fri, 25 Nov 2022 16:10:05 +0000 (17:10 +0100)]
Adjust description once more

19 months agofix clippy tests
Esteban Küber [Mon, 28 Nov 2022 08:41:31 +0000 (00:41 -0800)]
fix clippy tests

19 months agoRename `ast::Lit` as `ast::MetaItemLit`.
Nicholas Nethercote [Wed, 23 Nov 2022 04:39:42 +0000 (15:39 +1100)]
Rename `ast::Lit` as `ast::MetaItemLit`.

19 months agoAuto merge of #9967 - koka831:fix/9416, r=llogiq
bors [Sun, 27 Nov 2022 19:03:06 +0000 (19:03 +0000)]
Auto merge of #9967 - koka831:fix/9416, r=llogiq

Remove blank lines when needless_return returns no value

fix https://github.com/rust-lang/rust-clippy/issues/9416

changelog: [`needless_return`] improve result format

r? `@llogiq`

19 months agoAuto merge of #9963 - ehuss:highfive-triagebot, r=xFrednet
bors [Sun, 27 Nov 2022 16:20:05 +0000 (16:20 +0000)]
Auto merge of #9963 - ehuss:highfive-triagebot, r=xFrednet

Migrate from highfive to triagebot

This migrates this repository from using the highfive bot to using triagebot (aka rustbot).

This should not be merged without coordinating the removal of the highfive webhook and/or merging https://github.com/rust-lang/highfive/pull/435.

changelog: none

19 months agoaddressed review feedback
Yuri Astrakhan [Sun, 27 Nov 2022 15:34:13 +0000 (10:34 -0500)]
addressed review feedback

19 months agoMigrate from highfive to triagebot
Eric Huss [Mon, 24 Oct 2022 23:33:53 +0000 (16:33 -0700)]
Migrate from highfive to triagebot

19 months agoAdd allow-mixed-uninlined-format-args config
Yuri Astrakhan [Sun, 27 Nov 2022 15:12:51 +0000 (10:12 -0500)]
Add allow-mixed-uninlined-format-args config

Implement `allow-mixed-uninlined-format-args` config param to change the behavior of the `uninlined_format_args` lint. Now it is a part of `style`, and won't propose inlining in case of a mixed usage, e.g. `print!("{} {}", var, 1+2)`. If the user sets allow-mixed-uninlined-format-args config param to `false`, then it would behave like before, proposing to inline args even in the mixed case.

19 months agoAuto merge of #9919 - Alexendoo:configuration-link, r=xFrednet
bors [Sun, 27 Nov 2022 14:42:54 +0000 (14:42 +0000)]
Auto merge of #9919 - Alexendoo:configuration-link, r=xFrednet

Link to a list of configurable lints in documentation

changelog: none

19 months agoAuto merge of #104048 - cjgillot:split-lifetime, r=compiler-errors
bors [Sun, 27 Nov 2022 14:30:19 +0000 (14:30 +0000)]
Auto merge of #104048 - cjgillot:split-lifetime, r=compiler-errors

Separate lifetime ident from lifetime resolution in HIR

Drive-by: change how suggested generic args are computed.
Fixes https://github.com/rust-lang/rust/issues/103815

I recommend reviewing commit-by-commit.

19 months agoRefactor BytePos handling
koka [Sun, 27 Nov 2022 13:41:06 +0000 (22:41 +0900)]
Refactor BytePos handling

19 months agoRemove blank lines when needless_return returns no value
koka [Sun, 27 Nov 2022 13:01:21 +0000 (22:01 +0900)]
Remove blank lines when needless_return returns no value

fix https://github.com/rust-lang/rust-clippy/issues/9416

19 months agoAuto merge of #9860 - Alexendoo:msrv-outer-attr, r=Jarcho
bors [Sun, 27 Nov 2022 12:58:54 +0000 (12:58 +0000)]
Auto merge of #9860 - Alexendoo:msrv-outer-attr, r=Jarcho

Allow using `clippy::msrv` as an outer attribute

changelog: Allow specifying `#[clippy::msrv]` as an outer attribute

Probably not too useful to clippy users, but it makes the MSRV tests slightly cleaner

19 months agoAllow using `clippy::msrv` as an outer attribute
Alex Macleod [Sat, 19 Nov 2022 12:50:02 +0000 (12:50 +0000)]
Allow using `clippy::msrv` as an outer attribute

19 months agoLink to a list of configurable lints in documentation
Alex Macleod [Sun, 20 Nov 2022 13:27:55 +0000 (13:27 +0000)]
Link to a list of configurable lints in documentation

19 months agoAuto merge of #9950 - xFrednet:0000-improve-exit-docs, r=llogiq
bors [Sun, 27 Nov 2022 08:47:20 +0000 (08:47 +0000)]
Auto merge of #9950 - xFrednet:0000-improve-exit-docs, r=llogiq

Improve `EXIT` lint docs

Super simple change, hopefully fast and fun to review. Have a great start to the weekend!

changelog: none

19 months agoImprove `EXIT` lint docs
xFrednet [Fri, 25 Nov 2022 20:50:38 +0000 (21:50 +0100)]
Improve `EXIT` lint docs

19 months agoAuto merge of #9945 - kraktus:uninlined_multiple_lines, r=llogiq
bors [Fri, 25 Nov 2022 18:36:50 +0000 (18:36 +0000)]
Auto merge of #9945 - kraktus:uninlined_multiple_lines, r=llogiq

Re-enable `uninlined_format_args` on multiline `format!`

fix https://github.com/rust-lang/rust-clippy/issues/9719

There was an issue with the code suggestion which can be sometimes completely broken (fortunately when applied it's valid), so we do not show it.

changelog: [`uninlined_format_args`] re-enable for multiline format expression, but do not show the literal code suggestion in those cases

19 months agoAdjust semicolon block lint descriptions
Lukas Wirth [Thu, 24 Nov 2022 19:37:07 +0000 (20:37 +0100)]
Adjust semicolon block lint descriptions

19 months agoAddress reviews
Lukas Wirth [Thu, 24 Nov 2022 08:54:09 +0000 (09:54 +0100)]
Address reviews

19 months agoFix macro statement handling
Lukas Wirth [Wed, 16 Nov 2022 13:30:53 +0000 (14:30 +0100)]
Fix macro statement handling

19 months agoUse multi-span suggestions
Lukas Wirth [Tue, 15 Nov 2022 18:22:00 +0000 (19:22 +0100)]
Use multi-span suggestions

19 months agoFix formatting of let chains
Lukas Wirth [Tue, 15 Nov 2022 17:29:43 +0000 (18:29 +0100)]
Fix formatting of let chains

19 months agoAdd semicolon-outside/inside-block lints
Lukas Wirth [Thu, 10 Nov 2022 12:19:15 +0000 (13:19 +0100)]
Add semicolon-outside/inside-block lints

19 months agoAuto merge of #9944 - flip1995:move-syntax-tree-patterns, r=Manishearth
bors [Fri, 25 Nov 2022 15:59:47 +0000 (15:59 +0000)]
Auto merge of #9944 - flip1995:move-syntax-tree-patterns, r=Manishearth

Move syntax tree patterns RFC to the book

r? `@Manishearth`

Follow up to #3875

changelog: none

19 months agoAuto merge of #104846 - spastorino:santa-clauses-make-goals-early-christmas-🎄, r...
bors [Fri, 25 Nov 2022 15:59:31 +0000 (15:59 +0000)]
Auto merge of #104846 - spastorino:santa-clauses-make-goals-early-christmas-🎄, r=oli-obk

Branch Clause from Predicate

r? `@oli-obk`

This is part of what's proposed in https://github.com/rust-lang/compiler-team/issues/531

19 months agodogfood with expanded `uninlined_format_args`
kraktus [Fri, 25 Nov 2022 15:41:08 +0000 (16:41 +0100)]
dogfood with expanded `uninlined_format_args`

19 months agoRe-enable `uninlined_format_args` on multiline `format!`
kraktus [Fri, 25 Nov 2022 15:36:22 +0000 (16:36 +0100)]
Re-enable `uninlined_format_args` on multiline `format!`

But do not display the code suggestion which can be sometimes completely broken (fortunately when applied it's valid)