]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoRename stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:52:37 +0000 (03:52 -0700)]
Rename stderr

2 years agoRename lint
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:45:08 +0000 (03:45 -0700)]
Rename lint

2 years agorun rustfmt
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:16:10 +0000 (03:16 -0700)]
run rustfmt

2 years agoTidy import + update expected stderr
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:13:48 +0000 (03:13 -0700)]
Tidy import + update expected stderr

2 years agoTidy imports
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:04:50 +0000 (03:04 -0700)]
Tidy imports

2 years agoCheck for tuple structs
Nathaniel Hamovitz [Mon, 18 Oct 2021 10:03:48 +0000 (03:03 -0700)]
Check for tuple structs

2 years agoRefactor ZS array detection again and this one seems great 👍
Nathaniel Hamovitz [Mon, 18 Oct 2021 07:51:30 +0000 (00:51 -0700)]
Refactor ZS array detection again and this one seems great 👍

2 years agoupdate testsuite and expand `if_chain`
Nathaniel Hamovitz [Mon, 18 Oct 2021 00:28:45 +0000 (17:28 -0700)]
update testsuite and expand `if_chain`

2 years agoTidy comments + tests; revert 'size-is-zero' detection
Nathaniel Hamovitz [Sun, 17 Oct 2021 05:03:08 +0000 (22:03 -0700)]
Tidy comments + tests; revert 'size-is-zero' detection

2 years agotried to simplify but it doesn't work :/
Nathaniel Hamovitz [Sun, 17 Oct 2021 00:49:13 +0000 (17:49 -0700)]
tried to simplify but it doesn't work :/

2 years agointermediate step
Nathaniel Hamovitz [Sat, 16 Oct 2021 23:13:14 +0000 (16:13 -0700)]
intermediate step

2 years agoadd multiple `get_attrs` and `includes_repr` and they all work!
Nathaniel Hamovitz [Sat, 16 Oct 2021 22:26:10 +0000 (15:26 -0700)]
add multiple `get_attrs` and `includes_repr` and they all work!

2 years agoRan `dev bless`!
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:26:08 +0000 (02:26 -0700)]
Ran `dev bless`!

2 years agooutput looks fantastic
Nathaniel Hamovitz [Sat, 16 Oct 2021 09:01:17 +0000 (02:01 -0700)]
output looks fantastic

2 years agoit works i think (incl some `dbg`s)
Nathaniel Hamovitz [Sat, 16 Oct 2021 07:51:09 +0000 (00:51 -0700)]
it works i think (incl some `dbg`s)

2 years agoImplement getting an array of attributes!
Nathaniel Hamovitz [Sat, 16 Oct 2021 06:44:39 +0000 (23:44 -0700)]
Implement getting an array of attributes!

2 years agoImplement detecting trailing zero-sized array
Nathaniel Hamovitz [Fri, 15 Oct 2021 23:16:27 +0000 (16:16 -0700)]
Implement detecting trailing zero-sized array

2 years agoayy it compiles! ship it, right? 😎 /s
Nathaniel Hamovitz [Fri, 15 Oct 2021 08:31:26 +0000 (01:31 -0700)]
ayy it compiles! ship it, right? 😎 /s

why was `rustc_lint_defs` not already externed in `lib.rs`?
and how was r-a able to find it but cargo wasn't? 🤔

2 years agoWell it builds
Nathaniel Hamovitz [Fri, 15 Oct 2021 07:13:42 +0000 (00:13 -0700)]
Well it builds

2 years agoAdd boilerplate and basic tests
Nathaniel Hamovitz [Fri, 15 Oct 2021 03:08:38 +0000 (20:08 -0700)]
Add boilerplate and basic tests

2 years agoAuto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet
bors [Mon, 18 Oct 2021 07:25:12 +0000 (07:25 +0000)]
Auto merge of #7835 - mikerite:unneeded-allow-20211018, r=xFrednet

Remove unneeded allow

Remove unneeded allow

changelog: none

2 years agoRemove unneeded allow
Michael Wright [Mon, 18 Oct 2021 06:46:11 +0000 (08:46 +0200)]
Remove unneeded allow

2 years agoAuto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate
bors [Mon, 18 Oct 2021 00:22:48 +0000 (00:22 +0000)]
Auto merge of #7832 - narpfel:implicit-saturating-sub-false-positive-else, r=giraffate

Fix false positive of `implicit_saturating_sub` with `else` clause

Fixes #7831

changelog: Fix false positive of [`implicit_saturating_sub`] with `else` clause

2 years agoFix false positive of `implicit_saturating_sub` with `else` clause
Paul Gey [Sun, 17 Oct 2021 13:56:59 +0000 (15:56 +0200)]
Fix false positive of `implicit_saturating_sub` with `else` clause

Fixes #7831

2 years agoAuto merge of #7827 - zvavybir:master, r=xFrednet
bors [Sat, 16 Oct 2021 19:07:37 +0000 (19:07 +0000)]
Auto merge of #7827 - zvavybir:master, r=xFrednet

Fixed naive doc formatting for `#[must_use]` lints

The documentation of a few lints around the `#[must_use]` attribute had a few times "[`#[must_use]`]" (without the parentheses, but with the `[]`) and once the "`" was missing.

changelog: Fixed naive doc formatting for `#[must_use]` lints ([`must_use_unit`], [`double_must_use`], [`must_use_candidate`], [`let_underscore_must_use`])

2 years agoFixed naive doc formatting for `#[must_use]` lints
Matthias Kaak [Sat, 16 Oct 2021 15:23:34 +0000 (15:23 +0000)]
Fixed naive doc formatting for `#[must_use]` lints

2 years agoAuto merge of #7743 - smoelius:master, r=camsteffen
bors [Fri, 15 Oct 2021 17:05:13 +0000 (17:05 +0000)]
Auto merge of #7743 - smoelius:master, r=camsteffen

Add `format_in_format_args` and `to_string_in_format_args` lints

Fixes #7667 and #7729

I put these in `perf` since that was one of `@jplatte's` suggestions, and `redundant_clone` (which I consider to be similar) lives there as well.

However, I am open to changing the category or anything else.

r? `@camsteffen`

changelog: Add `format_in_format_args` and `to_string_in_format_args` lints

2 years agoRemove redundant `to_string`s
Samuel E. Moelius III [Thu, 30 Sep 2021 11:38:03 +0000 (07:38 -0400)]
Remove redundant `to_string`s

2 years agoFix adjacent tests
Samuel E. Moelius III [Thu, 30 Sep 2021 11:40:46 +0000 (07:40 -0400)]
Fix adjacent tests

2 years agoAdd `format_in_format_args` and `to_string_in_format_args` lints
Samuel E. Moelius III [Thu, 30 Sep 2021 11:45:03 +0000 (07:45 -0400)]
Add `format_in_format_args` and `to_string_in_format_args` lints

Fixes #7667 and #7729

2 years agoAuto merge of #7823 - mikerite:match-overlapping-arm-20211015, r=xFrednet
bors [Fri, 15 Oct 2021 12:42:16 +0000 (12:42 +0000)]
Auto merge of #7823 - mikerite:match-overlapping-arm-20211015, r=xFrednet

Some small improvements to the `match_overlapping_arm` tests

changelog: none

2 years agoAuto merge of #7824 - dswij:unnecessary_sort_by, r=llogiq
bors [Fri, 15 Oct 2021 11:16:57 +0000 (11:16 +0000)]
Auto merge of #7824 - dswij:unnecessary_sort_by, r=llogiq

`unnecessary_sort_by` checks if argument implements `Ord` trait

closes #7822

changelog: [`unnecessary_sort_by`] now checks if argument implements `Ord` trait

2 years agoAdd test on `unnecessary_sort_by` when argument does not implement `Ord`
dswij [Fri, 15 Oct 2021 10:06:02 +0000 (18:06 +0800)]
Add test on `unnecessary_sort_by` when argument does not implement `Ord`

2 years ago`unnecessary_sort_by` only warns if argument impl `Ord` trait
dswij [Fri, 15 Oct 2021 10:00:02 +0000 (18:00 +0800)]
`unnecessary_sort_by` only warns if argument impl `Ord` trait

2 years agoAdd unbounded pats to `match_overlapping_arm` tests
Michael Wright [Fri, 15 Oct 2021 04:25:11 +0000 (06:25 +0200)]
Add unbounded pats to `match_overlapping_arm` tests

2 years agoRefactor overlapping arm tests
Michael Wright [Fri, 15 Oct 2021 04:20:28 +0000 (06:20 +0200)]
Refactor overlapping arm tests

Make the `println!`s match the patterns. Currently they are using the
deprecated syntax for inclusive ranges and extra spacing.

2 years agoAuto merge of #7815 - nhamovitz:patch-1, r=giraffate
bors [Wed, 13 Oct 2021 23:44:42 +0000 (23:44 +0000)]
Auto merge of #7815 - nhamovitz:patch-1, r=giraffate

Fix typo in example for `match_result_ok`

changelog: Fix typo in example for ``[`match_result_ok`]``

2 years agoAuto merge of #7805 - aDotInTheVoid:transmute-num-bits, r=camsteffen
bors [Wed, 13 Oct 2021 19:40:33 +0000 (19:40 +0000)]
Auto merge of #7805 - aDotInTheVoid:transmute-num-bits, r=camsteffen

Add lint transmute_num_to_bytes

Closes #7803

changelog: [`transmute_num_to_bytes`] new lint

2 years agoFix typo in example for `match_result_ok`
nhamovitz [Wed, 13 Oct 2021 19:12:46 +0000 (12:12 -0700)]
Fix typo in example for `match_result_ok`

2 years agoAdd lint transmute_num_to_bytes
Nixon Enraght-Moony [Mon, 11 Oct 2021 22:46:49 +0000 (23:46 +0100)]
Add lint transmute_num_to_bytes

Closes #7803

changelog: [`transmute_num_to_bytes`] new lint

2 years agoAuto merge of #7788 - flip1995:eq_if_let_sugg, r=giraffate
bors [Wed, 13 Oct 2021 12:04:57 +0000 (12:04 +0000)]
Auto merge of #7788 - flip1995:eq_if_let_sugg, r=giraffate

Do not expand macros in equatable_if_let suggestion

Fixes #7781

Let's use Hacktoberfest as a motivation to start contributing PRs myself again :)

changelog: [`equatable_if_let`]: No longer expands macros in the suggestion

2 years agoAuto merge of #7682 - Qwaz:uninit_vec, r=xFrednet
bors [Tue, 12 Oct 2021 21:04:13 +0000 (21:04 +0000)]
Auto merge of #7682 - Qwaz:uninit_vec, r=xFrednet

Implement uninit_vec lint

changelog: add the new lint [`uninit_vec`]

Fix #7681

2 years agoUpdate lint description for new() and default()
Yechan Bae [Tue, 12 Oct 2021 20:01:58 +0000 (16:01 -0400)]
Update lint description for new() and default()

2 years agoAuto merge of #7806 - Serial-ATA:lint-match-case-mismatch, r=llogiq
bors [Tue, 12 Oct 2021 18:39:09 +0000 (18:39 +0000)]
Auto merge of #7806 - Serial-ATA:lint-match-case-mismatch, r=llogiq

Add match_str_case_mismatch lint

changelog: Added a new lint [`match_str_case_mismatch`]

Fixes #7440

2 years agoAuto merge of #7808 - Veykril:patch-1, r=xFrednet
bors [Tue, 12 Oct 2021 11:42:23 +0000 (11:42 +0000)]
Auto merge of #7808 - Veykril:patch-1, r=xFrednet

Bring [`manual_split_once`] docs in line with other lint docs

changelog: none

2 years agoAdd a suggestion
Serial [Tue, 12 Oct 2021 11:13:19 +0000 (07:13 -0400)]
Add a suggestion

2 years agoBring `manual_split_once` docs in line with other lint docs
Lukas Wirth [Tue, 12 Oct 2021 07:42:42 +0000 (09:42 +0200)]
Bring `manual_split_once` docs in line with other lint docs

2 years agoDon't run examples
Serial [Tue, 12 Oct 2021 00:40:13 +0000 (20:40 -0400)]
Don't run examples

2 years agoAdd match_str_case_mismatch lint
Serial [Tue, 12 Oct 2021 00:19:34 +0000 (20:19 -0400)]
Add match_str_case_mismatch lint

2 years agoAuto merge of #7791 - JamesHinshelwood:reason-in-disallowed-type, r=giraffate
bors [Tue, 12 Oct 2021 00:17:37 +0000 (00:17 +0000)]
Auto merge of #7791 - JamesHinshelwood:reason-in-disallowed-type, r=giraffate

Allow giving reasons for `disallowed_types`

Similar to #7609 but for the `disallowed_type` lint. The permitted form of configuration is the same as for `disallowed_methods`.

changelog: Allow giving reasons for [`disallowed_type`]

2 years agoAuto merge of #7793 - mikerite:new_lint-msrv-2, r=Manishearth
bors [Mon, 11 Oct 2021 17:41:00 +0000 (17:41 +0000)]
Auto merge of #7793 - mikerite:new_lint-msrv-2, r=Manishearth

Add option to `new_lint` to generate MSRV enabled lint

changelog: none

2 years agoRename `disallowed` to `conf_disallowed`
James Hinshelwood [Mon, 11 Oct 2021 07:28:32 +0000 (08:28 +0100)]
Rename `disallowed` to `conf_disallowed`

Co-authored-by: James Hinshelwood <james.hinshelwood@bigpayme.com>
2 years agoAdd reason config example for disallowed_type
James Hinshelwood [Mon, 11 Oct 2021 07:25:30 +0000 (08:25 +0100)]
Add reason config example for disallowed_type

Co-authored-by: James Hinshelwood <james.hinshelwood@bigpayme.com>
2 years agoAuto merge of #7795 - ThibsG:MutMut6922, r=giraffate
bors [Mon, 11 Oct 2021 01:14:53 +0000 (01:14 +0000)]
Auto merge of #7795 - ThibsG:MutMut6922, r=giraffate

Fix FP in external macros for `mut_mut` lint

Fix FP in `mut_mut` lint when type is defined in external macros.

fixes: #6922

changelog: [`mut_mut`] Fix FP when type is defined in external macros

2 years agoAuto merge of #7800 - 1nF0rmed:no-lint-in-match-single-amp, r=llogiq
bors [Sun, 10 Oct 2021 11:13:05 +0000 (11:13 +0000)]
Auto merge of #7800 - 1nF0rmed:no-lint-in-match-single-amp, r=llogiq

Refactor `clippy::match_ref_pats` to check for multiple reference patterns

fixes #7740

When there is only one pattern, to begin with, i.e. a single deref(`&`), then in such cases we suppress `clippy::match_ref_pats`.
This is done by checking the count of the reference pattern and emitting `clippy::match_ref_pats` when more than one pattern is present.

Removed certain errors in the `stderr` tests as they would not be triggered.

changelog: Refactor `clippy::match_ref_pats` to check for multiple reference patterns

2 years agoAdds additional tests for lint
1nF0rmed [Sun, 10 Oct 2021 09:16:28 +0000 (14:46 +0530)]
Adds additional tests for lint

2 years agoRefactor to check for multiple reference patterns
1nF0rmed [Sat, 9 Oct 2021 17:00:12 +0000 (22:30 +0530)]
Refactor to check for multiple reference patterns

2 years agoFix FP in external macros for `mut_mut` lint
ThibsG [Sat, 9 Oct 2021 13:54:16 +0000 (15:54 +0200)]
Fix FP in external macros for `mut_mut` lint

2 years agoAuto merge of #7794 - ThibsG:FieldReassignDefault6312, r=llogiq
bors [Sat, 9 Oct 2021 13:44:36 +0000 (13:44 +0000)]
Auto merge of #7794 - ThibsG:FieldReassignDefault6312, r=llogiq

Fix false positive when `Drop` and `Copy` involved in `field_reassign_with_default` lint

Fix FP in `field_reassign_with_default` lint when type implements `Drop` but not all fields are `Copy`.

fixes: #6312

changelog: [`field_reassign_with_default`] Fix FP when `Drop` and `Copy` are involved

2 years agoFix false positive when `Drop` and `Copy` involved
ThibsG [Sat, 9 Oct 2021 12:56:33 +0000 (14:56 +0200)]
Fix false positive when `Drop` and `Copy` involved

2 years agoAddress internal lints
Yechan Bae [Sat, 9 Oct 2021 09:59:53 +0000 (05:59 -0400)]
Address internal lints

2 years agoImproved error message for set_len() on empty Vec
Yechan Bae [Thu, 7 Oct 2021 15:53:08 +0000 (11:53 -0400)]
Improved error message for set_len() on empty Vec

2 years agoAdd testcases
Yechan Bae [Thu, 7 Oct 2021 15:18:01 +0000 (11:18 -0400)]
Add testcases

2 years agoAddress PR comments
Yechan Bae [Tue, 5 Oct 2021 15:43:44 +0000 (11:43 -0400)]
Address PR comments

2 years agoExtract get_vec_init_kind and share it
Yechan Bae [Sun, 3 Oct 2021 04:23:57 +0000 (00:23 -0400)]
Extract get_vec_init_kind and share it

2 years agoAdd #allow attribute to suppress FP #7698
Yechan Bae [Tue, 21 Sep 2021 13:56:56 +0000 (09:56 -0400)]
Add #allow attribute to suppress FP #7698

2 years agoImprove error messages
Yechan Bae [Mon, 20 Sep 2021 19:32:53 +0000 (15:32 -0400)]
Improve error messages

2 years agoHandle PR feedbacks first round
Yechan Bae [Fri, 17 Sep 2021 18:42:32 +0000 (14:42 -0400)]
Handle PR feedbacks first round

2 years agoFix clippy lints
Yechan Bae [Fri, 17 Sep 2021 07:27:31 +0000 (03:27 -0400)]
Fix clippy lints

2 years agoImplement uninit_vec lint
Yechan Bae [Fri, 17 Sep 2021 06:55:26 +0000 (02:55 -0400)]
Implement uninit_vec lint

2 years agoUse `indoc` for formatting
Michael Wright [Sat, 9 Oct 2021 03:58:05 +0000 (05:58 +0200)]
Use `indoc` for formatting

2 years agoFix `clippy::too-many-arguments` violation
Michael Wright [Sat, 9 Oct 2021 03:58:05 +0000 (05:58 +0200)]
Fix `clippy::too-many-arguments` violation

2 years agoAdd `--msrv` option to `new_lint` command
Michael Wright [Sat, 9 Oct 2021 03:58:05 +0000 (05:58 +0200)]
Add `--msrv` option to `new_lint` command

2 years agoAuto merge of #7789 - flip1995:double_semi_if_nothing_returned, r=camsteffen
bors [Fri, 8 Oct 2021 21:30:16 +0000 (21:30 +0000)]
Auto merge of #7789 - flip1995:double_semi_if_nothing_returned, r=camsteffen

Don't trigger semicolon_if_nothing_returned in expanded code

Fixes #7768

Before, this lint didn't trigger on macros. With rust-lang/rust#88175
this isn't enough anymore. In this PR a `WhileLoop` desugaring kind was
introduced. This overrides the span of expanded expressions when
lowering the while loop. So if a while loop is in a macro, the
expressions that it expands to are no longer marked with
`ExpnKind::Macro`, but with `ExpnKind::Desugaring`. In general, this is
the correct behavior and the same that is done for `ForLoop`s. It just
tripped up this lint.

r? `@camsteffen`

changelog: [`semicolon_if_nothing_returned`]: Fix regression on macros containing while loops

2 years agoAllow giving reasons for `disallowed_types`
James Hinshelwood [Fri, 8 Oct 2021 19:45:44 +0000 (20:45 +0100)]
Allow giving reasons for `disallowed_types`

Co-authored-by: James Hinshelwood <james.hinshelwood@bigpayme.com>
2 years agoDon't trigger semicolon_if_nothing_returned in expanded code
flip1995 [Fri, 8 Oct 2021 14:16:56 +0000 (16:16 +0200)]
Don't trigger semicolon_if_nothing_returned in expanded code

Before this lint didn't trigger on macros. With rust-lang/rust#88175
this isn't enough anymore. In this PR a `WhileLoop` desugaring kind was
introduced. This overrides the span of expanded expressions when
lowering the while loop. So if a while loop is in a macro, the
expressions that it expands to are no longer marked with
`ExpnKind::Macro`, but with `ExpnKind::Desugaring`. In general, this is
the correct behavior and the same that is done for `ForLoop`s. It just
tripped up this lint.

2 years agoDo not expand macros in equatable_if_let suggestion
flip1995 [Fri, 8 Oct 2021 13:26:10 +0000 (15:26 +0200)]
Do not expand macros in equatable_if_let suggestion

2 years agoAuto merge of #7748 - Serial-ATA:lint-undocumented-unsafe, r=flip1995
bors [Fri, 8 Oct 2021 07:29:26 +0000 (07:29 +0000)]
Auto merge of #7748 - Serial-ATA:lint-undocumented-unsafe, r=flip1995

Add undocumented_unsafe_blocks lint

changelog: Added a new lint [`undocumented_unsafe_blocks`]

Fixes #7464, #7238 (?)

2 years agoAdd undocumented_unsafe_blocks lint
Serial [Sat, 2 Oct 2021 03:25:48 +0000 (23:25 -0400)]
Add undocumented_unsafe_blocks lint

2 years agoAuto merge of #7705 - michaelsproul:fn_to_numeric_cast_any, r=camsteffen
bors [Thu, 7 Oct 2021 14:14:19 +0000 (14:14 +0000)]
Auto merge of #7705 - michaelsproul:fn_to_numeric_cast_any, r=camsteffen

Restriction lint for function pointer casts

The existing lints for function pointer casts cover the cases where a cast is non-portable or would result in truncation, however there's currently no way to forbid numeric function pointer casts entirely.

I've added a new lint `fn_to_numeric_cast_any`, which allows one to ban _all_ numeric function pointer casts, including to `usize`. This is useful if you're writing high-level Rust and want to opt-out of potentially surprising behaviour, avoiding silent bugs from forgotten parentheses, e.g.

```rust
fn foo() -> u32 {
    10
}

fn main() {
    let _ = foo as usize; // oops, forgot to call foo and got a random address instead!
}
```

~~I'm open to suggestions for the naming of the lint, because `fn_to_numeric_cast_any` is a bit clunky. Ideally I'd call this lint `fn_to_numeric_cast`, but that name is already taken for the more specific lint~~. We've stuck with `fn_to_numeric_cast_any` to avoid renaming the existing lint, or choosing a different name that's too generic (like `fn_cast`).

I'm also open to changing the suggestion behaviour, as adding parentheses is only one of many possible ways to fix the lint.

changelog: add ``[`fn_to_numeric_cast_any`]`` restriction lint

2 years agoRestriction lint for function pointer casts
Michael Sproul [Thu, 7 Oct 2021 00:50:14 +0000 (11:50 +1100)]
Restriction lint for function pointer casts

2 years agoAuto merge of #7782 - dswij:shadow-unrelated-block, r=flip1995
bors [Thu, 7 Oct 2021 09:49:19 +0000 (09:49 +0000)]
Auto merge of #7782 - dswij:shadow-unrelated-block, r=flip1995

Make `shadow_reuse` suggestion less verbose

Closes #7764

Make `shadow_reuse` suggestion less verbose.

changelog: [`shadow_reuse`] does not warn shadowing statement

2 years agoAuto merge of #7779 - rust-lang:test_module, r=flip1995
bors [Thu, 7 Oct 2021 09:36:51 +0000 (09:36 +0000)]
Auto merge of #7779 - rust-lang:test_module, r=flip1995

make test module detection more strict

I started with some small improvements to clippy_utils/src/lib.rs, but then found that our "test" module detection would also catch words containing "test" like e.g. "attestation". So I made this a bit more strict (splitting by `'_'` and checking for `test` or `tests`), adding a test case as I went.

---

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: none

2 years agoAuto merge of #7783 - flip1995:rustup, r=flip1995
bors [Thu, 7 Oct 2021 09:18:25 +0000 (09:18 +0000)]
Auto merge of #7783 - flip1995:rustup, r=flip1995

Rustup

r? `@ghost`

Finally an easy, conflict free rustup again :tada:

changelog: none

2 years agoBump nightly version -> 2021-10-07
flip1995 [Thu, 7 Oct 2021 09:12:27 +0000 (11:12 +0200)]
Bump nightly version -> 2021-10-07

2 years agoAllow invalid-paths for regex paths
flip1995 [Thu, 7 Oct 2021 09:12:02 +0000 (11:12 +0200)]
Allow invalid-paths for regex paths

2 years agoMerge remote-tracking branch 'upstream/master' into rustup
flip1995 [Thu, 7 Oct 2021 09:11:23 +0000 (11:11 +0200)]
Merge remote-tracking branch 'upstream/master' into rustup

2 years agoMake `shadow_reuse` suggestion less verbose
dswij [Thu, 7 Oct 2021 08:39:13 +0000 (16:39 +0800)]
Make `shadow_reuse` suggestion less verbose

2 years agoAuto merge of #7780 - mikerite:update_lints_mod_revert, r=llogiq
bors [Thu, 7 Oct 2021 05:00:53 +0000 (05:00 +0000)]
Auto merge of #7780 - mikerite:update_lints_mod_revert, r=llogiq

Revert `update_lints` module list generating code

This commit reverts the module list generation code to what it was
before the change to `include!` it and generates better output.

changelog: none

2 years agoRevert `update_lints` module list generating code
Michael Wright [Thu, 7 Oct 2021 04:37:56 +0000 (06:37 +0200)]
Revert `update_lints` module list generating code

This commit reverts the module list generation code to what it was
before the change to `include!` it and generates better output.

2 years agomake test module detection more strict
Andre Bogus [Wed, 6 Oct 2021 22:14:06 +0000 (00:14 +0200)]
make test module detection more strict

2 years agoAuto merge of #7772 - Manishearth:doc-markdown-intra, r=camsteffen
bors [Wed, 6 Oct 2021 19:16:22 +0000 (19:16 +0000)]
Auto merge of #7772 - Manishearth:doc-markdown-intra, r=camsteffen

Handle intra-doc links in doc_markdown

Fixes #7758

changelog: Handle intra-doc links in [`doc_markdown`]

2 years agoHandle intra-doc links in doc_markdown
Manish Goregaokar [Wed, 6 Oct 2021 07:01:40 +0000 (00:01 -0700)]
Handle intra-doc links in doc_markdown

2 years agoAdd regression test for #7758
Manish Goregaokar [Wed, 6 Oct 2021 06:48:41 +0000 (23:48 -0700)]
Add regression test for #7758

2 years agoAuto merge of #7776 - tsoutsman:patch-1, r=flip1995
bors [Wed, 6 Oct 2021 13:23:13 +0000 (13:23 +0000)]
Auto merge of #7776 - tsoutsman:patch-1, r=flip1995

Fix typos

I'm not sure whether I should add links to `bool`, `char`, and `str`. `slice` could also be linked to.

changelog: none

2 years agoFix typos
Klim Tsoutsman [Wed, 6 Oct 2021 12:32:22 +0000 (23:32 +1100)]
Fix typos

I'm not sure whether I should add links to `bool`, `char`, and `str`. `slice` could also be linked to.

2 years agoAuto merge of #7774 - dswij:useless-exponent, r=llogiq
bors [Wed, 6 Oct 2021 07:54:27 +0000 (07:54 +0000)]
Auto merge of #7774 - dswij:useless-exponent, r=llogiq

Useless exponent

Closes #7745

I'm open to some thoughts on dropping the exponents on suggestions when it's zero. I personally don't see any problem on this.

changelog: [`useless_exponent`] suggestion drops exponent when exponent value is zero

2 years agoAuto merge of #7773 - Manishearth:update-lints-mods, r=flip1995
bors [Wed, 6 Oct 2021 07:38:38 +0000 (07:38 +0000)]
Auto merge of #7773 - Manishearth:update-lints-mods, r=flip1995

Move module declarations back into lib.rs

With #7673 we moved a lot of things from lib.rs to lib.foo.rs. Unfortunately, rustfmt doesn't seem to work when module declarations are included via `include!` (and trying the `mod foo; use foo::*;` trick doesn't seem to work much either in our specific case).

With this PR we continue generating everything in subfiles except for module declarations, which are now generated within lib.rs.

changelog: none

2 years agoAdd tests for zero exponents in `excessive_precision`
dswij [Wed, 6 Oct 2021 07:33:05 +0000 (15:33 +0800)]
Add tests for zero exponents in `excessive_precision`

2 years agoRegen update_lints
Manish Goregaokar [Wed, 6 Oct 2021 07:12:58 +0000 (00:12 -0700)]
Regen update_lints