]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoAuto merge of #6247 - giraffate:fix_suggestion_to_add_space_in_unused_unit, r=ebroto
bors [Wed, 4 Nov 2020 22:42:10 +0000 (22:42 +0000)]
Auto merge of #6247 - giraffate:fix_suggestion_to_add_space_in_unused_unit, r=ebroto

Fix suggestion to add unneeded space in `unused_unit`

Fix https://github.com/rust-lang/rust-clippy/issues/6230

changelog: Fix suggestion to add unneeded space in `unused_unit`

3 years agoAuto merge of #5911 - hegza:issue-568, r=ebroto
bors [Wed, 4 Nov 2020 22:21:44 +0000 (22:21 +0000)]
Auto merge of #5911 - hegza:issue-568, r=ebroto

Add lint for 'field_reassign_with_default` #568

changelog: Add lint for field_reassign_with_default that checks if mutable object + field modification is used to edit a binding initialized with Default::default() instead of struct constructor.

Fixes #568

Notes:
- Checks for reassignment of one or more fields of a binding initialized with Default::default().
- Implemented using EarlyLintPass, might be future proofed better with LateLintPass.
- Does not trigger if Default::default() is used via another type implementing Default.
- This is a re-open of [PR#4761](https://github.com/rust-lang/rust-clippy/pull/4761), but I couldn't figure out how to re-open that one so here's a new one with the requested changes :S

3 years agoAuto merge of #6292 - ebroto:rustup, r=ebroto
bors [Wed, 4 Nov 2020 21:53:32 +0000 (21:53 +0000)]
Auto merge of #6292 - ebroto:rustup, r=ebroto

Rustup

changelog: none

r? `@ghost`

3 years agoRun cargo dev fmt
Eduardo Broto [Wed, 4 Nov 2020 21:41:15 +0000 (22:41 +0100)]
Run cargo dev fmt

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
Eduardo Broto [Wed, 4 Nov 2020 21:37:11 +0000 (22:37 +0100)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agos/Scalar::Raw/Scalar::Int
oli [Sun, 1 Nov 2020 16:57:03 +0000 (16:57 +0000)]
s/Scalar::Raw/Scalar::Int

3 years agoSplit the "raw integer bytes" part out of `Scalar`
Oliver Scherer [Sat, 26 Sep 2020 13:15:35 +0000 (15:15 +0200)]
Split the "raw integer bytes" part out of `Scalar`

3 years agoAuto merge of #6284 - camsteffen:rustc-sym, r=flip1995
bors [Wed, 4 Nov 2020 09:22:54 +0000 (09:22 +0000)]
Auto merge of #6284 - camsteffen:rustc-sym, r=flip1995

Use const sym where possible

I ran a regex search and replace to use const `sym` values where possible. This should give some performance boost by avoiding string interning at runtime.

Con: It is not as consistent as always using `sym!`.

I also changed an internal lint to suggest using `sym::{}`, making an assumption that this will always work for diagnostic items.

changelog: none

3 years agoAuto merge of #6270 - ClashTheBunny:clarify_allow_deny_enable_disable, r=flip1995
bors [Wed, 4 Nov 2020 08:49:10 +0000 (08:49 +0000)]
Auto merge of #6270 - ClashTheBunny:clarify_allow_deny_enable_disable, r=flip1995

Clarify allow/warn/deny documentation.  Remove enable/disable.

Disable and enable when not specifically explained were not clear to me
as an English language speaker, but I was able to figure it out fairly
easily due to the examples having A/W, which I assumed meant `allow` and
`warn`.  I removed both words to be sure it was clear as well as
extending the note on what deny means.  It now includes a statement on
exactly what each word means.

Documentation only update.

*Please keep the line below*
changelog: none

3 years agoUpdate wording to avoid code having "lint" metaphor
Randall Mason [Tue, 3 Nov 2020 21:59:24 +0000 (15:59 -0600)]
Update wording to avoid code having "lint" metaphor

3 years agoAuto merge of #6233 - montrivo:manual_ok_or, r=flip1995
bors [Tue, 3 Nov 2020 16:42:59 +0000 (16:42 +0000)]
Auto merge of #6233 - montrivo:manual_ok_or, r=flip1995

add manual_ok_or lint

Implements partially #5923

changelog: add lint manual_ok_or

3 years agoAuto merge of #6165 - dvermd:ref_option_ref, r=flip1995
bors [Tue, 3 Nov 2020 16:21:51 +0000 (16:21 +0000)]
Auto merge of #6165 - dvermd:ref_option_ref, r=flip1995

Add lint 'ref_option_ref' #1377

This lint checks for usage of `&Option<&T>` which can be simplified as `Option<&T>` as suggested in #1377.

This WIP PR is here to get feedback on the lint as there's more cases to be handled:
* statics/consts,
* associated types,
* type alias,
* function/method parameter/return,
* ADT definitions (struct/tuple struct fields, enum variants)

changelog: Add 'ref_option_ref' lint

3 years agoAuto merge of #6101 - pitiK3U:from_iter_instead_of_collect, r=flip1995
bors [Tue, 3 Nov 2020 15:59:16 +0000 (15:59 +0000)]
Auto merge of #6101 - pitiK3U:from_iter_instead_of_collect, r=flip1995

Add lint: from_iter_instead_of_collect

Fixes #5679

This implements lint for `::from_iter()` from #5679 not the general issue (`std::ops::Add::add`, etc.).
This lint checks if expression is function call with `from_iter` name and if it's implementation of the `std::iter::FromIterator` trait.

changelog: Introduce  from_iter_instead_of_collect lint

3 years agoFix: Use `.collect()` instead of `::fromIterator()`
Piti the little Light [Sat, 24 Oct 2020 11:53:09 +0000 (13:53 +0200)]
Fix: Use `.collect()` instead of `::fromIterator()`

3 years agoFix: Don't show lint for types that doesn't implement Iterator
Piti the little Light [Mon, 12 Oct 2020 15:27:50 +0000 (17:27 +0200)]
Fix: Don't show lint for types that doesn't implement Iterator

3 years agoImprove error message
Piti the little Light [Thu, 1 Oct 2020 17:04:19 +0000 (19:04 +0200)]
Improve error message

3 years agoRemove backticks
Piti the little Light [Thu, 1 Oct 2020 16:44:12 +0000 (18:44 +0200)]
Remove backticks

3 years agoRun `cargo dev fmt`
Piti the little Light [Thu, 1 Oct 2020 16:36:49 +0000 (18:36 +0200)]
Run `cargo dev fmt`

3 years agoImprove: error message
Piti the little Light [Thu, 1 Oct 2020 16:34:36 +0000 (18:34 +0200)]
Improve: error message

3 years agoAllow lint
Piti the little Light [Thu, 1 Oct 2020 16:17:50 +0000 (18:17 +0200)]
Allow  lint

3 years agoImprovements from PR feedback
Piti the little Light [Thu, 1 Oct 2020 16:04:05 +0000 (18:04 +0200)]
Improvements from PR feedback

3 years agoUpdate: stderr message format
Piti the little Light [Thu, 1 Oct 2020 10:36:17 +0000 (12:36 +0200)]
Update: stderr message format

3 years agoFix `from_iter_instead_of_collect` lint crashing on exprs without path segment
Piti the little Light [Fri, 11 Sep 2020 11:29:52 +0000 (13:29 +0200)]
Fix `from_iter_instead_of_collect` lint crashing on exprs without path segment

3 years agoAdd tests for `from_iter_instead_of_collect`
Piti the little Light [Thu, 10 Sep 2020 18:18:23 +0000 (20:18 +0200)]
Add tests for `from_iter_instead_of_collect`

3 years agoRun `cargo dev update_lints`
Piti the little Light [Thu, 10 Sep 2020 18:16:28 +0000 (20:16 +0200)]
Run `cargo dev update_lints`

3 years agoAdd `from_iter_instead_of_collect` lint implementation
Piti the little Light [Thu, 10 Sep 2020 18:14:23 +0000 (20:14 +0200)]
Add `from_iter_instead_of_collect` lint implementation

3 years agoAuto merge of #6037 - matthiaskrgr:single_char_insert, r=flip1995
bors [Tue, 3 Nov 2020 15:36:33 +0000 (15:36 +0000)]
Auto merge of #6037 - matthiaskrgr:single_char_insert, r=flip1995

single_char_insert_str: lint using insert_str() on single-char literals and suggest insert()

Fixes #6026

changelog: add single_char_insert_str lint which lints using string.insert_str() with single char literals and suggests string.insert() with a char

3 years agoChange lint to use const sym
Cameron Steffen [Mon, 2 Nov 2020 17:47:17 +0000 (11:47 -0600)]
Change lint to use const sym

3 years agoUse const rustc sym where possible
Cameron Steffen [Mon, 2 Nov 2020 16:32:55 +0000 (10:32 -0600)]
Use const rustc sym where possible

3 years agoAuto merge of #6282 - giraffate:sync-from-rust, r=ebroto
bors [Mon, 2 Nov 2020 07:36:35 +0000 (07:36 +0000)]
Auto merge of #6282 - giraffate:sync-from-rust, r=ebroto

Rustup

changelog: none

3 years agoMerge remote-tracking branch 'upstream/master' into sync-from-rust
Takayuki Nakata [Mon, 2 Nov 2020 01:34:49 +0000 (10:34 +0900)]
Merge remote-tracking branch 'upstream/master' into sync-from-rust

3 years agoAuto merge of #75534 - Aaron1011:feature/new-future-breakage, r=pnkfelix
bors [Sun, 1 Nov 2020 16:52:28 +0000 (16:52 +0000)]
Auto merge of #75534 - Aaron1011:feature/new-future-breakage, r=pnkfelix

Implement rustc side of report-future-incompat

cc https://github.com/rust-lang/rust/issues/71249

This is an alternative to `@pnkfelix's` initial implementation in https://github.com/pnkfelix/rust/commits/prototype-rustc-side-of-report-future-incompat (mainly because I started working before seeing that branch :smile: ).

My approach outputs the entire original `Diagnostic`, in a way that is compatible with incremental compilation. This is not yet integrated with compiletest, but can be used manually by passing `-Z emit-future-incompat-report` to `rustc`.

Several changes are made to support this feature:
* The `librustc_session/lint` module is moved to a new crate `librustc_lint_defs` (name bikesheddable). This allows accessing lint definitions from `librustc_errors`.
* The `Lint` struct is extended with an `Option<FutureBreakage>`. When present, it indicates that we should display a lint in the future-compat report. `FutureBreakage` contains additional information that we may want to display in the report (currently, a `date` field indicating when the crate will stop compiling).
* A new variant `rustc_error::Level::Allow` is added. This is used when constructing a diagnostic for a future-breakage lint that is marked as allowed (via `#[allow]` or `--cap-lints`). This allows us to capture any future-breakage diagnostics in one place, while still discarding them before they are passed to the `Emitter`.
* `DiagnosticId::Lint` is extended with a `has_future_breakage` field, indicating whether or not the `Lint` has future breakage information (and should therefore show up in the report).
* `Session` is given access to the `LintStore` via a new `SessionLintStore` trait (since `librustc_session` cannot directly reference `LintStore` without a cyclic dependency). We use this to turn a string `DiagnosticId::Lint` back into a `Lint`, to retrieve the `FutureBreakage` data.

Currently, `FutureBreakage.date` is always set to `None`. However, this could potentially be interpreted by Cargo in the future.

I've enabled the future-breakage report for the `ARRAY_INTO_ITER` lint, which can be used to test out this PR. The intent is to use the field to allow Cargo to determine the date of future breakage (as described in [RFC 2834](https://github.com/rust-lang/rfcs/blob/master/text/2834-cargo-report-future-incompat.md)) without needing to parse the diagnostic itself.

cc `@pnkfelix`

3 years agoImplement field_reassign_with_default
Henri Lunnikivi [Thu, 31 Oct 2019 16:02:02 +0000 (18:02 +0200)]
Implement field_reassign_with_default

- Implement `field_reassign_with_default` as a `LateLintPass`
- Avoid triggering `default_trait_access` on a span already linted by
`field_reassigned_with_default`
- Merge `default_trait_access` and `field_reassign_with_default` into
`Default`
- Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
- Fixes #568

3 years agoAuto merge of #6276 - dp304:patch-1, r=llogiq
bors [Sat, 31 Oct 2020 13:01:11 +0000 (13:01 +0000)]
Auto merge of #6276 - dp304:patch-1, r=llogiq

Fix typo in adding_lints.md

changelog: none

3 years agoFix typo in adding_lints.md
dp304 [Sat, 31 Oct 2020 02:11:03 +0000 (03:11 +0100)]
Fix typo in adding_lints.md

3 years agoAuto merge of #6277 - ebroto:rustup, r=ebroto
bors [Sat, 31 Oct 2020 08:52:32 +0000 (08:52 +0000)]
Auto merge of #6277 - ebroto:rustup, r=ebroto

Rustup

changelog: none

3 years agoFix formatting
Eduardo Broto [Sat, 31 Oct 2020 08:34:01 +0000 (09:34 +0100)]
Fix formatting

3 years agoMerge remote-tracking branch 'upstream/master' into rustup
Eduardo Broto [Sat, 31 Oct 2020 08:33:40 +0000 (09:33 +0100)]
Merge remote-tracking branch 'upstream/master' into rustup

3 years agoUpdate Clippy path to `Lint`
Aaron Hill [Sat, 31 Oct 2020 01:41:16 +0000 (21:41 -0400)]
Update Clippy path to `Lint`

3 years agoAddress suggestions in PR review
Eduardo Broto [Fri, 30 Oct 2020 22:47:22 +0000 (23:47 +0100)]
Address suggestions in PR review

3 years agoRename single_char_push_str to single_char_add_str
Eduardo Broto [Wed, 7 Oct 2020 22:03:26 +0000 (00:03 +0200)]
Rename single_char_push_str to single_char_add_str

3 years agoget_hint_if_single_char_arg: fix bug where multi-char letters are not detected properly
Matthias Krüger [Thu, 24 Sep 2020 14:36:29 +0000 (16:36 +0200)]
get_hint_if_single_char_arg: fix bug where multi-char letters are not detected properly

3 years agohandle macros returning Strings in single_char_push_str and single_char_insert_str
Matthias Krüger [Mon, 14 Sep 2020 13:31:04 +0000 (15:31 +0200)]
handle macros returning Strings in single_char_push_str and single_char_insert_str

3 years agosingle_char_push_str lint using insert_str() on single-char literals and suggest...
Matthias Krüger [Sun, 13 Sep 2020 11:00:45 +0000 (13:00 +0200)]
single_char_push_str lint using insert_str() on single-char literals and suggest insert()

changelog: single_char_push_str: lint using string.insert_str() with single char literals and suggests string.insert() with a char

Fixes #6026

3 years agoAuto merge of #6260 - matthiaskrgr:ices, r=ebroto
bors [Fri, 30 Oct 2020 22:19:11 +0000 (22:19 +0000)]
Auto merge of #6260 - matthiaskrgr:ices, r=ebroto

add a couple of ICE testcases

Fixes #6250
Fixes #6251
Fixes #6252
Fixes #6255
Fixes #6256

changelog: none

3 years agoAuto merge of #6197 - ThibsG:ImproveFilterNext, r=ebroto
bors [Fri, 30 Oct 2020 21:58:09 +0000 (21:58 +0000)]
Auto merge of #6197 - ThibsG:ImproveFilterNext, r=ebroto

Improve suggestions for several lints

This PR is a follow-up of this [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/filter_next.20lint).

It unifies placeholders for `methods` module and improves several suggestions for `filter_next`, `filter_map_next` and `map_unwrap_or` lints.

changelog: none

3 years agoClarify allow/warn/deny. Remove enable/disable.
Randall Mason [Fri, 30 Oct 2020 17:16:11 +0000 (12:16 -0500)]
Clarify allow/warn/deny.  Remove enable/disable.

Disable and enable when not specifically explained were not clear to me
as an English language speaker, but I was able to figure it out fairly
easily due to the examples having A/W, which I assumed meant `allow` and
`warn`.  I removed both words to be sure it was clear as well as
extending the note on what deny means.  It now includes a statement on
exactly what each word means.

3 years agoAuto merge of #6229 - henil:improve-integer-division-lint, r=phansch
bors [Fri, 30 Oct 2020 12:37:46 +0000 (12:37 +0000)]
Auto merge of #6229 - henil:improve-integer-division-lint, r=phansch

Update the existing arithmetic lint

re: #6209

Updates the lint to not the error message if RHS of binary operation `/` of `%` is a literal/constant that is not `0` or `-1`, as suggested [here](https://github.com/rust-lang/rust-clippy/issues/6209#issuecomment-715624354)

changelog: Expand [`integer_arithmetic`] to work with RHS literals and constants

3 years agoremoved lint for division/modulo for literal `0`
henil [Fri, 30 Oct 2020 11:41:44 +0000 (17:11 +0530)]
removed lint for division/modulo for literal `0`

3 years agoRemove implicit `Continue` type
LeSeulArtichaut [Sun, 25 Oct 2020 10:50:56 +0000 (11:50 +0100)]
Remove implicit `Continue` type

3 years agoUse `ControlFlow::is{break,continue}`
LeSeulArtichaut [Thu, 22 Oct 2020 08:20:24 +0000 (10:20 +0200)]
Use `ControlFlow::is{break,continue}`

3 years agoTypeVisitor: use `ControlFlow` in clippy
LeSeulArtichaut [Wed, 21 Oct 2020 12:27:32 +0000 (14:27 +0200)]
TypeVisitor: use `ControlFlow` in clippy

3 years agoAuto merge of #6200 - rail-rain:borrowed_box_invalid_sugg, r=phansch
bors [Fri, 30 Oct 2020 10:40:44 +0000 (10:40 +0000)]
Auto merge of #6200 - rail-rain:borrowed_box_invalid_sugg, r=phansch

fix the error-causing suggestion of 'borrowed_box'

Fixes #3128

Fix the suggestion of 'borrowed_box', which causes a syntax error because it misses necessary parentheses.

---

changelog: Fix the error-causing suggestion of 'borrowed_box'

3 years agoadd manual_ok_or / pr remarks
Tim Nielens [Thu, 29 Oct 2020 18:08:54 +0000 (19:08 +0100)]
add manual_ok_or / pr remarks

3 years agoclippy: update reference file to match suggested change
dvermd [Thu, 29 Oct 2020 16:38:46 +0000 (17:38 +0100)]
clippy: update reference file to match suggested change

3 years agoUpdate clippy_lints/src/ref_option_ref.rs
dvermd [Thu, 29 Oct 2020 16:39:19 +0000 (17:39 +0100)]
Update clippy_lints/src/ref_option_ref.rs

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoAuto merge of #6248 - giraffate:replace_e_easy_with_good_first_issue, r=flip1995
bors [Thu, 29 Oct 2020 15:54:38 +0000 (15:54 +0000)]
Auto merge of #6248 - giraffate:replace_e_easy_with_good_first_issue, r=flip1995

Replace `E-easy` with `good first issue` in `CONTRIBUTING.md`

`E-easy` isn't used, so `good first issue` is more appropriate.

changelog: none

3 years agoAuto merge of #6227 - HMPerson1:collect_map, r=phansch
bors [Thu, 29 Oct 2020 15:34:15 +0000 (15:34 +0000)]
Auto merge of #6227 - HMPerson1:collect_map, r=phansch

Add lint for replacing `.map().collect()` with `.try_for_each()`

Fixes #6208

changelog: Add `map_collect_result_unit`

3 years agoUpdate CONTRIBUTING.md to describe `E-medium` in detail
Takayuki Nakata [Thu, 29 Oct 2020 15:24:29 +0000 (00:24 +0900)]
Update CONTRIBUTING.md to describe `E-medium` in detail

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoAuto merge of #6226 - Urcra:master, r=flip1995
bors [Thu, 29 Oct 2020 15:12:24 +0000 (15:12 +0000)]
Auto merge of #6226 - Urcra:master, r=flip1995

Add lint for comparing to empty slices instead of using .is_empty()

Hey first time making a clippy lint

I added the implementation of the lint the `len_zero` since it shared a lot of the code, I would otherwise have to rewrite. Just tell me if the lint should use it's own file instead

changelog: Add lint for comparing to empty slices

Fixes #6217

3 years agoAuto merge of #6176 - achris:issues/578, r=phansch
bors [Thu, 29 Oct 2020 14:51:41 +0000 (14:51 +0000)]
Auto merge of #6176 - achris:issues/578, r=phansch

Lint items after statements in local macro expansions

The items_after_statements lint was skipping all expansions.  Instead
we should still lint local macros.

Fixes #578

---

*Please keep the line below*
changelog: The items_after_statements now applies to local macro expansions

3 years agoRemove empty lines in doc comment
Christian Nielsen [Thu, 29 Oct 2020 14:49:42 +0000 (15:49 +0100)]
Remove empty lines in doc comment

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoAuto merge of #6212 - ThibsG:MacroTopLevelRefArg, r=flip1995
bors [Thu, 29 Oct 2020 14:29:30 +0000 (14:29 +0000)]
Auto merge of #6212 - ThibsG:MacroTopLevelRefArg, r=flip1995

No lint in macro for `toplevel_ref_arg`

Do not lint when the span is from a macro.

Question: shouldn't we extend this for external macros also ?

Fixes: #5849
changelog: none

3 years agoUpdate existing arithmetic lint and add new tests related to it.
henil [Mon, 26 Oct 2020 13:58:22 +0000 (19:28 +0530)]
Update existing arithmetic lint and add new tests related to it.

3 years agoAuto merge of #6264 - matthiaskrgr:ra_setup_no_twice, r=llogiq
bors [Thu, 29 Oct 2020 07:49:27 +0000 (07:49 +0000)]
Auto merge of #6264 - matthiaskrgr:ra_setup_no_twice, r=llogiq

cargo dev ra-setup: don't inject deps multiple times if we have already done so

Fixes #6220

changelog: none

3 years agocargo dev ra-setup: don't inject deps multiple times if we have already done so
Matthias Krüger [Thu, 29 Oct 2020 02:22:02 +0000 (03:22 +0100)]
cargo dev ra-setup: don't inject deps multiple times if we have already done so

Fixes #6220

3 years agoMerge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyup
Eduardo Broto [Wed, 28 Oct 2020 22:36:07 +0000 (23:36 +0100)]
Merge commit '645ef505da378b6f810b1567806d1bcc2856395f' into clippyup

3 years agoadd a couple of ICE testcases
Matthias Krüger [Wed, 28 Oct 2020 13:45:21 +0000 (14:45 +0100)]
add a couple of ICE testcases

Fixes #6250
Fixes #6251
Fixes #6252
Fixes #6255
Fixes #6256

3 years agoAuto merge of #6263 - matthiaskrgr:diff_u, r=ebroto
bors [Wed, 28 Oct 2020 22:33:01 +0000 (22:33 +0000)]
Auto merge of #6263 - matthiaskrgr:diff_u, r=ebroto

use diff -u in driver.sh test

this changs the add/delete indication from
>
>
<
to
+
+
-
(same as git diff)

changelog: none

3 years agouse diff -u in driver.sh test
Matthias Krüger [Wed, 28 Oct 2020 22:19:04 +0000 (23:19 +0100)]
use diff -u in driver.sh test

this changs the add/delete indication from
>
>
<
to
+
+
-
(same as git diff)

3 years agoAuto merge of #6257 - giraffate:sync-from-rust, r=ebroto
bors [Wed, 28 Oct 2020 21:53:23 +0000 (21:53 +0000)]
Auto merge of #6257 - giraffate:sync-from-rust, r=ebroto

Rustup

changelog: none

3 years agoReinstate link to temporary_cstr_as_ptr
Eduardo Broto [Wed, 28 Oct 2020 21:36:22 +0000 (22:36 +0100)]
Reinstate link to temporary_cstr_as_ptr

3 years agoDeprecate temporary_cstr_as_ptr
Eduardo Broto [Wed, 28 Oct 2020 21:32:13 +0000 (22:32 +0100)]
Deprecate temporary_cstr_as_ptr

3 years agoUse `double_neg.stderr`
Takayuki Nakata [Wed, 28 Oct 2020 16:02:09 +0000 (01:02 +0900)]
Use `double_neg.stderr`

3 years agoFix reference
Takayuki Nakata [Wed, 28 Oct 2020 05:36:29 +0000 (14:36 +0900)]
Fix reference

3 years agocargo dev update_lints
Takayuki Nakata [Wed, 28 Oct 2020 05:25:41 +0000 (14:25 +0900)]
cargo dev update_lints

3 years agoMerge remote-tracking branch 'upstream/master' into sync-from-rust
Takayuki Nakata [Wed, 28 Oct 2020 05:14:09 +0000 (14:14 +0900)]
Merge remote-tracking branch 'upstream/master' into sync-from-rust

3 years agoFix suggestion to add unneeded space in `unused_unit`
Takayuki Nakata [Tue, 27 Oct 2020 14:18:08 +0000 (23:18 +0900)]
Fix suggestion to add unneeded space in `unused_unit`

3 years agoAuto merge of #6216 - alex-700:improve-match-like-matches-lint, r=ebroto
bors [Tue, 27 Oct 2020 23:01:35 +0000 (23:01 +0000)]
Auto merge of #6216 - alex-700:improve-match-like-matches-lint, r=ebroto

Improve match like matches lint

fixes #6186

changelog: improve MATCH_LIKE_MATCHES_MACRO lint

3 years agoimprove MATCH_LIKE_MATCHES_MACRO lint
Aleksei Latyshev [Sat, 24 Oct 2020 15:06:07 +0000 (18:06 +0300)]
improve MATCH_LIKE_MATCHES_MACRO lint

- add tests
- refactor match_same_arms lint
- prioritize match_expr_like_matches_macro over match_same_arms

3 years agosimplify SpanlessEq::eq_path_segment
Aleksei Latyshev [Sat, 24 Oct 2020 15:05:02 +0000 (18:05 +0300)]
simplify SpanlessEq::eq_path_segment

3 years agoReplace `E-easy` with `good first issue` in `CONTRIBUTING.md`
Takayuki Nakata [Tue, 27 Oct 2020 14:32:38 +0000 (23:32 +0900)]
Replace `E-easy` with `good first issue` in `CONTRIBUTING.md`

`E-easy` isn't used, so `good first issue` is more appropriate.

3 years agoAuto merge of #6244 - mikerite:invalid_paths_20201027, r=flip1995
bors [Tue, 27 Oct 2020 11:16:21 +0000 (11:16 +0000)]
Auto merge of #6244 - mikerite:invalid_paths_20201027, r=flip1995

New internal lint: Invalid paths

Add a new internal lint that detects invalid paths in the `util::paths` and fix some invalid paths found.

This commit partially addresses #6047 but the lint would have to be run before running tests to close that issue.

changelog: none

3 years agoFix invalid paths
Michael Wright [Tue, 27 Oct 2020 05:43:38 +0000 (07:43 +0200)]
Fix invalid paths

3 years agoAdd `invalid_paths` internal lint
Michael Wright [Tue, 27 Oct 2020 05:42:13 +0000 (07:42 +0200)]
Add `invalid_paths` internal lint

3 years agoadd manual_ok_or lint
Tim Nielens [Tue, 27 Oct 2020 00:47:40 +0000 (01:47 +0100)]
add manual_ok_or lint

3 years agofix the error-causing suggestion of 'borrowed_box'
rail [Tue, 20 Oct 2020 20:42:00 +0000 (09:42 +1300)]
fix the error-causing suggestion of 'borrowed_box'

fix the error-causing suggestion of 'borrowed_box',
which missed parentheses and was ambiguous.

3 years agoRemove lint from clippy
Nathan Whitaker [Tue, 22 Sep 2020 16:23:22 +0000 (12:23 -0400)]
Remove lint from clippy

3 years agoExplain why 'run-rustfix' is not defined
dvermd [Mon, 26 Oct 2020 21:50:13 +0000 (22:50 +0100)]
Explain why 'run-rustfix' is not defined

3 years agoChange Applicability to MaybeIncorrect
dvermd [Mon, 26 Oct 2020 21:33:48 +0000 (22:33 +0100)]
Change Applicability to MaybeIncorrect

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoclippy_lint: run after changing category to pendantic
dvermd [Tue, 20 Oct 2020 05:11:25 +0000 (07:11 +0200)]
clippy_lint: run  after changing category to pendantic

3 years agoUpdate clippy_lints/src/ref_option_ref.rs
dvermd [Mon, 19 Oct 2020 23:23:39 +0000 (01:23 +0200)]
Update clippy_lints/src/ref_option_ref.rs

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoclippy_lint: Add Known Problems message
dvermd [Mon, 19 Oct 2020 20:01:37 +0000 (22:01 +0200)]
clippy_lint: Add Known Problems message

3 years agoUpdate clippy_lints/src/ref_option_ref.rs
dvermd [Mon, 19 Oct 2020 19:38:36 +0000 (21:38 +0200)]
Update clippy_lints/src/ref_option_ref.rs

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoUpdate clippy_lints/src/ref_option_ref.rs doctest
dvermd [Mon, 19 Oct 2020 19:37:36 +0000 (21:37 +0200)]
Update clippy_lints/src/ref_option_ref.rs doctest

Co-authored-by: Philipp Krones <hello@philkrones.com>
3 years agoclippy_lint: Add test cases
dvermd [Thu, 15 Oct 2020 19:56:56 +0000 (21:56 +0200)]
clippy_lint: Add test cases

3 years agoclippy_lint: Refactor 'ref_option_ref'
dvermd [Tue, 13 Oct 2020 21:01:57 +0000 (23:01 +0200)]
clippy_lint: Refactor 'ref_option_ref'

3 years agoclippy_lint: Allow 'ref_option_ref' for 'option_if_let_else'
dvermd [Tue, 13 Oct 2020 20:47:46 +0000 (22:47 +0200)]
clippy_lint: Allow 'ref_option_ref' for 'option_if_let_else'

3 years agoclippy_lint: Add 'ref_option_ref' remove unused import
dvermd [Tue, 13 Oct 2020 20:46:47 +0000 (22:46 +0200)]
clippy_lint: Add 'ref_option_ref' remove unused import

3 years agoclippy_lint: Add 'ref_option_ref' move to check_ty and add type alias test
dvermd [Tue, 13 Oct 2020 20:13:54 +0000 (22:13 +0200)]
clippy_lint: Add 'ref_option_ref' move to check_ty and add type alias test