]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRestrict unnecessary_sort_by to non-ref copy types
Eduardo Broto [Fri, 4 Sep 2020 09:56:54 +0000 (11:56 +0200)]
Restrict unnecessary_sort_by to non-ref copy types

3 years agoneedless-lifetime - fix nested elision site FPs
Tim Nielens [Thu, 27 Aug 2020 21:22:32 +0000 (23:22 +0200)]
needless-lifetime - fix nested elision site FPs

3 years agoAuto merge of #5997 - giraffate:fix_fp_about_clone_in_same_item_push, r=ebroto
bors [Sat, 5 Sep 2020 20:27:17 +0000 (20:27 +0000)]
Auto merge of #5997 - giraffate:fix_fp_about_clone_in_same_item_push, r=ebroto

Fix FP in `same_item_push`

Don't emit a lint when the pushed item doesn't have Clone trait

Fix #5979

changelog: Fix FP in `same_item_push` not to emit a lint when the pushed item doesn't have Clone trait

3 years agoFix FP when coercion kicks in
Takayuki Nakata [Sat, 5 Sep 2020 15:02:35 +0000 (00:02 +0900)]
Fix FP when coercion kicks in

3 years agoAuto merge of #6009 - Ryan1729:show-line_count-and-max_lines-in-too_many_lines-lint...
bors [Sat, 5 Sep 2020 06:05:29 +0000 (06:05 +0000)]
Auto merge of #6009 - Ryan1729:show-line_count-and-max_lines-in-too_many_lines-lint-message, r=phansch

Show line count and max lines in too_many_lines lint message

This PR adds the current amount of lines and the current maximum number of lines in the message for the `too_many_lines` lint, in a similar way as the `too_many_arguments` lint currently does.

changelog: show the line count and the maximum lines in the message for the `too_many_lines` lint.

3 years agorun the specific script suggested by the error message
Ryan1729 [Sat, 5 Sep 2020 03:12:16 +0000 (21:12 -0600)]
run the specific script suggested by the error message

```
./tests/ui-toml/update-references.sh './target/debug/test_build_base' 'functions_maxlines/test.rs'
```

3 years agorun tests/ui/update-all-references.sh
Ryan1729 [Sat, 5 Sep 2020 02:16:02 +0000 (20:16 -0600)]
run tests/ui/update-all-references.sh

3 years agoadd line_count and max_lines to too_many_lines lint message
Ryan1729 [Sat, 5 Sep 2020 01:26:35 +0000 (19:26 -0600)]
add line_count and max_lines to too_many_lines lint message

3 years agoupdate example to be more idiomatic
Jane Lusby [Fri, 4 Sep 2020 22:55:13 +0000 (15:55 -0700)]
update example to be more idiomatic

3 years agoAuto merge of #6007 - ebroto:sync-from-rust, r=ebroto
bors [Fri, 4 Sep 2020 22:19:01 +0000 (22:19 +0000)]
Auto merge of #6007 - ebroto:sync-from-rust, r=ebroto

Rustup

r? @ghost

changelog: none

3 years agoRun cargo dev fmt
Eduardo Broto [Fri, 4 Sep 2020 21:30:55 +0000 (23:30 +0200)]
Run cargo dev fmt

3 years agoFix fallout from rustup
Eduardo Broto [Fri, 4 Sep 2020 21:30:06 +0000 (23:30 +0200)]
Fix fallout from rustup

3 years agoMerge remote-tracking branch 'upstream/master' into sync-from-rust
Eduardo Broto [Fri, 4 Sep 2020 21:27:01 +0000 (23:27 +0200)]
Merge remote-tracking branch 'upstream/master' into sync-from-rust

3 years agoty.flags -> ty.flags()
LeSeulArtichaut [Thu, 6 Aug 2020 15:49:46 +0000 (17:49 +0200)]
ty.flags -> ty.flags()

3 years ago`ty.kind` -> `ty.kind()` in rustdoc and clippy
LeSeulArtichaut [Mon, 3 Aug 2020 22:18:29 +0000 (00:18 +0200)]
`ty.kind` -> `ty.kind()` in rustdoc and clippy

3 years agoAuto merge of #6004 - mikerite:default-trait-access-20200904, r=ebroto
bors [Fri, 4 Sep 2020 06:31:04 +0000 (06:31 +0000)]
Auto merge of #6004 - mikerite:default-trait-access-20200904, r=ebroto

Simplify `clippy::default_trait_access`

Remove repeated matching on the same QPath.

changelog: none

3 years agoSimplify `clippy::default_trait_access`
Michael Wright [Fri, 4 Sep 2020 03:15:31 +0000 (05:15 +0200)]
Simplify `clippy::default_trait_access`

Remove repeated matching on the same QPath.

3 years agoAuto merge of #5994 - taiki-e:useless_attribute, r=phansch
bors [Thu, 3 Sep 2020 05:33:03 +0000 (05:33 +0000)]
Auto merge of #5994 - taiki-e:useless_attribute, r=phansch

useless_attribute: Permit wildcard_imports and enum_glob_use

Fixes #5918

changelog: `useless_attribute`: Permit `wildcard_imports` and `enum_glob_use` on `use` items

3 years agoAuto merge of #6003 - mikerite:fix-tests-20200903, r=phansch
bors [Thu, 3 Sep 2020 05:12:26 +0000 (05:12 +0000)]
Auto merge of #6003 - mikerite:fix-tests-20200903, r=phansch

Update ui stderr with improved rustc output

Related rust pull request: rust-lang/rust#76160

changelog: none

3 years agoUpdate ui stderr with improved rustc output
Michael Wright [Thu, 3 Sep 2020 02:58:14 +0000 (04:58 +0200)]
Update ui stderr with improved rustc output

Related rust pull request: rust-lang/rust#76160

3 years agoRemoved map_err suggestion in lint, and updated lint documentation example
Ricky [Wed, 2 Sep 2020 23:21:34 +0000 (19:21 -0400)]
Removed map_err suggestion in lint, and updated lint documentation example

3 years agounit-arg - pr remarks
Tim Nielens [Wed, 2 Sep 2020 21:30:40 +0000 (23:30 +0200)]
unit-arg - pr remarks

3 years agoAuto merge of #76160 - scileo:format-recovery, r=petrochenkov
bors [Wed, 2 Sep 2020 19:29:27 +0000 (19:29 +0000)]
Auto merge of #76160 - scileo:format-recovery, r=petrochenkov

Improve recovery on malformed format call

The token following a format expression should be a comma. However, when it is replaced with a similar token (such as a dot), then the corresponding error is emitted, but the token is treated as a comma, and the parsing step continues.

r? @petrochenkov

3 years agoMerge branch 'master' into unit-arg
Tim Nielens [Wed, 2 Sep 2020 17:39:54 +0000 (19:39 +0200)]
Merge branch 'master' into unit-arg

3 years agoAuto merge of #5996 - Koxiaet:master, r=ebroto
bors [Wed, 2 Sep 2020 12:24:31 +0000 (12:24 +0000)]
Auto merge of #5996 - Koxiaet:master, r=ebroto

Allow GraphQL in docs without backticks

changelog: Allow "GraphQL" in [`doc_markdown`] without backticks.

3 years agoAdd tests for allowed non-backticked identifiers in doc
Koxiaet [Wed, 2 Sep 2020 11:51:44 +0000 (12:51 +0100)]
Add tests for allowed non-backticked identifiers in doc

3 years agoImprove recovery on malformed format call
Sasha [Mon, 31 Aug 2020 09:45:50 +0000 (11:45 +0200)]
Improve recovery on malformed format call

If a comma in a format call is replaced with a similar token, then we
emit an error and continue parsing, instead of stopping at this point.

3 years agoAuto merge of #6000 - ebroto:sync-from-rust, r=ebroto
bors [Wed, 2 Sep 2020 07:56:44 +0000 (07:56 +0000)]
Auto merge of #6000 - ebroto:sync-from-rust, r=ebroto

Sync from rust

r? @ghost

changelog: none

3 years agoRun cargo dev fmt
Eduardo Broto [Wed, 2 Sep 2020 06:57:00 +0000 (08:57 +0200)]
Run cargo dev fmt

3 years agoMerge remote-tracking branch 'upstream/master' into sync-from-rust
Eduardo Broto [Wed, 2 Sep 2020 06:53:29 +0000 (08:53 +0200)]
Merge remote-tracking branch 'upstream/master' into sync-from-rust

3 years agoAuto merge of #5999 - rail-rain:fix_fp_transmute_ptr_to_ptr_in_consts, r=ebroto
bors [Tue, 1 Sep 2020 22:28:55 +0000 (22:28 +0000)]
Auto merge of #5999 - rail-rain:fix_fp_transmute_ptr_to_ptr_in_consts, r=ebroto

Fix a fp in `transmute_ptr_to_ptr`

fixes #5959

changelog: Fix a false positive in `transmute_ptr_to_ptr` that the lint fires when `transmute` is used to cast a reference in const contexts although dereferencing raw pointers in consts is unstable.

3 years agoRan cargo dev update_lints
Ricky [Tue, 1 Sep 2020 21:05:40 +0000 (17:05 -0400)]
Ran cargo dev update_lints

3 years agoAdded tests for map_err, ignored map_err lint on drop_ref tests
Ricky [Tue, 1 Sep 2020 20:59:37 +0000 (16:59 -0400)]
Added tests for map_err, ignored map_err lint on drop_ref tests

3 years agoWorking map_err_ignore lint
Ricky [Tue, 1 Sep 2020 20:26:59 +0000 (16:26 -0400)]
Working map_err_ignore lint

3 years agoAuto merge of #5993 - taiki-e:default_trait_access, r=phansch
bors [Tue, 1 Sep 2020 15:05:16 +0000 (15:05 +0000)]
Auto merge of #5993 - taiki-e:default_trait_access, r=phansch

default_trait_access: Fix wrong suggestion

https://github.com/rust-lang/rust-clippy/issues/5975#issuecomment-683751131
> I think the underlying problem is clippy suggests code with complete parameters, not clippy triggers this lint even for complex types. AFAIK, If code compiles with `Default::default`, it doesn't need to specify any parameters, as type inference is working. (So, in this case, `default_trait_access` should suggest `RefCell::default`.)

Fixes #5975 Fixes #5990

changelog: `default_trait_access`: fixed wrong suggestion

3 years agoFix FP in `same_item_push`
Takayuki Nakata [Tue, 1 Sep 2020 13:39:09 +0000 (22:39 +0900)]
Fix FP in `same_item_push`

Don't emit a lint when the pushed item doesn't have Clone trait

3 years agoAllow GraphQL in doc without backticks
Koxiaet [Tue, 1 Sep 2020 13:05:19 +0000 (14:05 +0100)]
Allow GraphQL in doc without backticks

3 years agouseless_attribute: Permit wildcard_imports and enum_glob_use
Taiki Endo [Tue, 1 Sep 2020 03:09:32 +0000 (12:09 +0900)]
useless_attribute: Permit wildcard_imports and enum_glob_use

3 years agoFix a fp in `transmute_ptr_to_ptr`
rail [Mon, 31 Aug 2020 23:21:48 +0000 (11:21 +1200)]
Fix a fp in `transmute_ptr_to_ptr`

Avoid firing the lint when `transmute` in const contexts
as dereferencing raw pointers in consts is unstable. cc #5959

3 years agofixed bug
Vali Schneider [Mon, 31 Aug 2020 20:32:05 +0000 (13:32 -0700)]
fixed bug

3 years agoAuto merge of #5992 - giraffate:fix_wrong_seggestion_in_collapsible_if, r=yaahc
bors [Mon, 31 Aug 2020 19:41:13 +0000 (19:41 +0000)]
Auto merge of #5992 - giraffate:fix_wrong_seggestion_in_collapsible_if, r=yaahc

Fix the wrong suggestion when using macro in `collapsible_if`

Fix #5962

changelog: Fix the wrong suggestion when using macro in `collapsible_if`

3 years agoAuto merge of #5909 - khuey:async_yields_async, r=yaahc
bors [Mon, 31 Aug 2020 19:20:30 +0000 (19:20 +0000)]
Auto merge of #5909 - khuey:async_yields_async, r=yaahc

Add a lint for an async block/closure that yields a type that is itself awaitable.

This catches bugs of the form

tokio::spawn(async move {
    let f = some_async_thing();
    f // Oh no I forgot to await f so that work will never complete.
});

See the two XXXkhuey comments and the unfixed `_l` structure for things that need more thought.

*Please keep the line below*
changelog: none

3 years agodefault_trait_access: Fix wrong suggestion
Taiki Endo [Mon, 31 Aug 2020 15:31:53 +0000 (00:31 +0900)]
default_trait_access: Fix wrong suggestion

3 years agoFix the wrong suggestion when using macro in `collapsible_if`
Takayuki Nakata [Mon, 31 Aug 2020 15:05:53 +0000 (00:05 +0900)]
Fix the wrong suggestion when using macro in `collapsible_if`

3 years agoUse `match_def_path` instead of `match_qpath`
Hirochika Matsumoto [Mon, 31 Aug 2020 13:40:47 +0000 (22:40 +0900)]
Use `match_def_path` instead of `match_qpath`

3 years agoAuto merge of #5984 - ebroto:5693_const_assoc_fn, r=flip1995
bors [Mon, 31 Aug 2020 10:43:58 +0000 (10:43 +0000)]
Auto merge of #5984 - ebroto:5693_const_assoc_fn, r=flip1995

or_fn_call: ignore nullary associated const fns

The fix in #5889 was missing associated functions.

changelog: Ignore also `const fn` methods in [`or_fun_call`]

Fixes #5693

3 years agoFix clippy
Aaron Hill [Sun, 30 Aug 2020 23:17:17 +0000 (19:17 -0400)]
Fix clippy

3 years agoAuto merge of #5988 - camelid:patch-2, r=ebroto
bors [Sun, 30 Aug 2020 20:21:00 +0000 (20:21 +0000)]
Auto merge of #5988 - camelid:patch-2, r=ebroto

Syntax-highlight `single_char_push_str` lint

It wasn't being syntax highlighted in the online lint index:

![image](https://user-images.githubusercontent.com/37223377/91666682-8fc02000-eab3-11ea-95fa-6671472712c8.png)

changelog: none

3 years agoSyntax-highlight `single_char_push_str` lint
Camelid [Sun, 30 Aug 2020 18:24:15 +0000 (11:24 -0700)]
Syntax-highlight `single_char_push_str` lint

3 years agoUpdate dataflow analyses to use new interface
Dylan MacKenzie [Fri, 28 Aug 2020 20:26:25 +0000 (13:26 -0700)]
Update dataflow analyses to use new interface

3 years agouncommented fn
Vali Schneider [Sat, 29 Aug 2020 23:22:15 +0000 (16:22 -0700)]
uncommented fn

3 years agochanged check_impl_item to check_fn and added a few more test cases
Vali Schneider [Sat, 29 Aug 2020 23:17:53 +0000 (16:17 -0700)]
changed check_impl_item to check_fn and added a few more test cases

3 years agoFormatting changes requested by ThibsG.
Kyle Huey [Sun, 23 Aug 2020 04:40:01 +0000 (21:40 -0700)]
Formatting changes requested by ThibsG.

3 years agoAdd a test for an async function.
Kyle Huey [Sun, 23 Aug 2020 04:36:39 +0000 (21:36 -0700)]
Add a test for an async function.

3 years agoAdd a lint for an async block/closure that yields a type that is itself awaitable.
Kyle Huey [Sat, 15 Aug 2020 00:30:48 +0000 (17:30 -0700)]
Add a lint for an async block/closure that yields a type that is itself awaitable.

This catches bugs of the form

tokio::spawn(async move {
    let f = some_async_thing();
    f // Oh no I forgot to await f so that work will never complete.
});

3 years agoDowngrade applicability of `create_dir`
Hirochika Matsumoto [Sat, 29 Aug 2020 05:20:01 +0000 (14:20 +0900)]
Downgrade applicability of `create_dir`

3 years agoor_fn_call: ignore nullary associated const fns
Eduardo Broto [Fri, 28 Aug 2020 23:18:42 +0000 (01:18 +0200)]
or_fn_call: ignore nullary associated const fns

3 years agoMerge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup
flip1995 [Fri, 28 Aug 2020 14:10:16 +0000 (16:10 +0200)]
Merge commit '3d0b0e66afdfaa519d8855b338b35b4605775945' into clippyup

3 years agoAuto merge of #5970 - ebroto:changelog_beta_1_47, r=flip1995
bors [Fri, 28 Aug 2020 13:08:29 +0000 (13:08 +0000)]
Auto merge of #5970 - ebroto:changelog_beta_1_47, r=flip1995

Update changelog to beta 1.47

[Rendered](https://github.com/ebroto/rust-clippy/blob/changelog_beta_1_47/CHANGELOG.md)

changelog: none

3 years agoAuto merge of #5774 - ThibsG:FixNewRetNoSelf, r=ebroto
bors [Fri, 28 Aug 2020 11:54:07 +0000 (11:54 +0000)]
Auto merge of #5774 - ThibsG:FixNewRetNoSelf, r=ebroto

Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block

Lint in trait def instead of impl block.

Fixes: #5435
changelog: none

3 years agoFix errors
Hirochika Matsumoto [Fri, 28 Aug 2020 10:56:03 +0000 (19:56 +0900)]
Fix errors

3 years agoFix clippy error
Hirochika Matsumoto [Fri, 28 Aug 2020 10:35:04 +0000 (19:35 +0900)]
Fix clippy error

3 years agoAdd STD_FS_CREATE_DIR into paths
Hirochika Matsumoto [Fri, 28 Aug 2020 09:53:15 +0000 (18:53 +0900)]
Add STD_FS_CREATE_DIR into paths

3 years agoAdd a new lint to prevent `create_dir` from being used
Hirochika Matsumoto [Fri, 28 Aug 2020 09:40:22 +0000 (18:40 +0900)]
Add a new lint to prevent `create_dir` from being used

3 years agoUpdate clippy_lints/src/methods/mod.rs
Thibaud [Fri, 28 Aug 2020 07:33:05 +0000 (09:33 +0200)]
Update clippy_lints/src/methods/mod.rs

Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
3 years agoUpdate clippy_lints/src/utils/mod.rs
Thibaud [Fri, 28 Aug 2020 07:31:29 +0000 (09:31 +0200)]
Update clippy_lints/src/utils/mod.rs

Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
3 years agoUpdate clippy_lints/src/utils/mod.rs
Thibaud [Fri, 28 Aug 2020 07:31:12 +0000 (09:31 +0200)]
Update clippy_lints/src/utils/mod.rs

Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
3 years agoadded lint for todo and removed option
Vali Schneider [Thu, 27 Aug 2020 23:55:23 +0000 (16:55 -0700)]
added lint for todo and removed option

3 years agoran cargo dev update lints
Vali Schneider [Thu, 27 Aug 2020 23:30:49 +0000 (16:30 -0700)]
ran cargo dev update lints

3 years agoAuto merge of #5971 - giraffate:fix_fp_in_to_string_in_display, r=ebroto
bors [Thu, 27 Aug 2020 23:26:52 +0000 (23:26 +0000)]
Auto merge of #5971 - giraffate:fix_fp_in_to_string_in_display, r=ebroto

Fix FP in `to_string_in_display`

Don't emit a lint when `.to_string()` on anything that is not `self`

Fix #5967

changelog: Fix FP in `to_string_in_display` when calling `.to_string()` on anything that is not `self`

3 years agoedited documentation
Vali Schneider [Thu, 27 Aug 2020 23:22:37 +0000 (16:22 -0700)]
edited documentation

3 years agoremoved unnecessary comment
Vali Schneider [Thu, 27 Aug 2020 23:19:24 +0000 (16:19 -0700)]
removed unnecessary comment

3 years agoadded restriction lint that prohibits the usage of unimplemented, unreachable or...
Vali Schneider [Thu, 27 Aug 2020 23:18:05 +0000 (16:18 -0700)]
added restriction lint that prohibits the usage of unimplemented, unreachable or panic in a function of type result or option

3 years agounit-arg - pr comments
Tim Nielens [Wed, 26 Aug 2020 23:40:02 +0000 (01:40 +0200)]
unit-arg - pr comments

3 years agoMerge logic of looking for `Self` type
ThibsG [Thu, 27 Aug 2020 16:24:59 +0000 (18:24 +0200)]
Merge logic of looking for `Self` type

3 years agoRemove expansion restriction + fix doc and tests naming
ThibsG [Tue, 25 Aug 2020 07:16:08 +0000 (09:16 +0200)]
Remove expansion restriction + fix doc and tests naming

3 years agoFix FP in `new_ret_no_self`: trigger in trait def instead of impl block
ThibsG [Tue, 7 Jul 2020 20:47:32 +0000 (22:47 +0200)]
Fix FP in `new_ret_no_self`: trigger in trait def instead of impl block

3 years agoFix FP in `to_string_in_display`
Takayuki Nakata [Thu, 27 Aug 2020 14:37:47 +0000 (23:37 +0900)]
Fix FP in `to_string_in_display`

Don't emit a lint when `.to_string()` on anything that is not `self`

3 years agoUpdate changelog to beta 1.47
Eduardo Broto [Thu, 27 Aug 2020 12:39:09 +0000 (14:39 +0200)]
Update changelog to beta 1.47

3 years agoAuto merge of #5957 - xvschneider:AddUnwrapInsideResultLint, r=yaahc
bors [Wed, 26 Aug 2020 23:38:34 +0000 (23:38 +0000)]
Auto merge of #5957 - xvschneider:AddUnwrapInsideResultLint, r=yaahc

Adding new lint to prevent usage of 'unwrap' inside functions that re…

### Change
Adding a new lint that will emit a warning when using "unwrap" or "expect" inside a function that returns result.
### Motivation
These functions promote recoverable errors to non-recoverable errors which may be undesirable in code bases which wish to avoid panics.
### Test plan
Running:
`TESTNAME=unwrap_in_result cargo uitest
`---

changelog: none

3 years agoAdd new lint to prevent usage of unwrap in fns that return result
Jane Lusby [Wed, 26 Aug 2020 23:31:49 +0000 (16:31 -0700)]
Add new lint to prevent usage of unwrap in fns that return result

3 years agoAuto merge of #5968 - rail-rain:fix_use_snippet_with_applicability, r=flip1995
bors [Wed, 26 Aug 2020 22:52:47 +0000 (22:52 +0000)]
Auto merge of #5968 - rail-rain:fix_use_snippet_with_applicability, r=flip1995

Fix the wrong use of `snippet_with_applicability`

For the context, please see https://github.com/rust-lang/rust-clippy/issues/5822#issuecomment-680749728 and https://github.com/rust-lang/rust-clippy/issues/5822#issuecomment-680783381.

---

changelog: none

3 years agoFix the wrong use of `snippet_with_applicability`
rail [Wed, 26 Aug 2020 22:23:21 +0000 (10:23 +1200)]
Fix the wrong use of `snippet_with_applicability`

This includes a workaround of the issue #5822,
the cause of this little mistake.

3 years agoAuto merge of #5966 - 1c3t3a:1c3t3a-dev-5819-fix, r=Manishearth
bors [Wed, 26 Aug 2020 18:15:42 +0000 (18:15 +0000)]
Auto merge of #5966 - 1c3t3a:1c3t3a-dev-5819-fix, r=Manishearth

Corrects the float_equality_without_abs lint

Fixes an issue in the `float_equality_without_abs` lint. The lint suggestion was configured in a way that it lints the whole error and not just the subtraction part. In the current configuration the lint would suggest to change the expression in a wrong way, e.g.
```rust
let _ = (a - b) < f32::EPSILON; // before
let _ = (a - b).abs(); // after
```
This was dicovered by @flip1995. (See discussion of PR #5952).

Also the suggestion is now formatted via `utils::sugg`.
changelog: none

3 years agoChanged the location of the suggestion as well as the way the suggestion is assembled
Bastian [Wed, 26 Aug 2020 14:39:30 +0000 (16:39 +0200)]
Changed the location of the suggestion as well as the way the suggestion is assembled

3 years agoAuto merge of #5946 - mikerite:fix-5729, r=flip1995
bors [Wed, 26 Aug 2020 12:01:32 +0000 (12:01 +0000)]
Auto merge of #5946 - mikerite:fix-5729, r=flip1995

Fix `let_and_return` bad suggestion

Add a cast to the suggestion when the return expression has adjustments.
These adjustments are lost when the suggestion is applied.

This is similar to the problem in issue #4437.

Closes #5729

changelog: Fix `let_and_return` bad suggestion

3 years agoAuto merge of #5949 - rail-rain:fix_fp_borrow_interior_mutable_const, r=oli-obk
bors [Wed, 26 Aug 2020 11:06:37 +0000 (11:06 +0000)]
Auto merge of #5949 - rail-rain:fix_fp_borrow_interior_mutable_const, r=oli-obk

Fix fp in `borrow_interior_mutable_const`

fixes #5796

changelog: fix false positive in `borrow_interior_mutable_const` when referencing a field behind a pointer.

3 years agoAuto merge of #5964 - matsujika:matsujika-patch-1, r=ebroto
bors [Wed, 26 Aug 2020 07:53:07 +0000 (07:53 +0000)]
Auto merge of #5964 - matsujika:matsujika-patch-1, r=ebroto

Fix typo

changelog: none

3 years agoFix typo
Hirochika Matsumoto [Wed, 26 Aug 2020 07:03:35 +0000 (16:03 +0900)]
Fix typo

3 years agoAuto merge of #5951 - ThibsG:FixMacroCloneOnRefPtr2076, r=ebroto
bors [Tue, 25 Aug 2020 21:48:19 +0000 (21:48 +0000)]
Auto merge of #5951 - ThibsG:FixMacroCloneOnRefPtr2076, r=ebroto

Fix incorrect suggestion when `clone_on_ref_ptr` is triggered in macros

In the lint `clone_on_ref_ptr`, if the `span` is in a macro, don't expand it for suggestion.

Fixes: #2076
changelog: none

r? @ebroto

3 years agoUpdate clippy_lints/src/methods/mod.rs
Thibaud [Tue, 25 Aug 2020 20:20:35 +0000 (22:20 +0200)]
Update clippy_lints/src/methods/mod.rs

Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
3 years agoAuto merge of #5961 - scottmcm:master, r=Manishearth
bors [Tue, 25 Aug 2020 19:30:05 +0000 (19:30 +0000)]
Auto merge of #5961 - scottmcm:master, r=Manishearth

Re-enable len_zero for ranges now that `is_empty` is stable on them

Fixes #5956

Completed stabilization PR: https://github.com/rust-lang/rust/pull/75132

changelog: len_zero: re-enable linting ranges now that range_is_empty is stable

3 years agoRe-enable len_zero for ranges now that `is_empty` is stable on them
Scott McMurray [Tue, 25 Aug 2020 19:05:02 +0000 (12:05 -0700)]
Re-enable len_zero for ranges now that `is_empty` is stable on them

3 years agoAuto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995
bors [Tue, 25 Aug 2020 17:15:51 +0000 (17:15 +0000)]
Auto merge of #5958 - mikerite:fix-fmt-20200825, r=flip1995

Various fmt test improvements

Various fmt test improvements.

changelog: none

3 years agoAuto merge of #5952 - 1c3t3a:1c3t3a-dev-5819, r=Manishearth
bors [Tue, 25 Aug 2020 16:54:48 +0000 (16:54 +0000)]
Auto merge of #5952 - 1c3t3a:1c3t3a-dev-5819, r=Manishearth

Added a lint which corrects expressions like (a - b) < f32::EPSILON, according to #5819

Fixes #5819
changelog: none

3 years agoAuto merge of #5947 - ebroto:rustup_doc_improvements, r=flip1995
bors [Tue, 25 Aug 2020 16:33:17 +0000 (16:33 +0000)]
Auto merge of #5947 - ebroto:rustup_doc_improvements, r=flip1995

Improve documentation related to the sync process

[Rendered](https://github.com/ebroto/rust-clippy/blob/rustup_doc_improvements/CONTRIBUTING.md)

r? @flip1995

changelog: none

3 years agoAuto merge of #5960 - flip1995:rustup, r=flip1995
bors [Tue, 25 Aug 2020 16:11:17 +0000 (16:11 +0000)]
Auto merge of #5960 - flip1995:rustup, r=flip1995

Rustup

r? @ghost

changelog: none

3 years agoFix typo
Philipp Krones [Tue, 25 Aug 2020 16:01:08 +0000 (18:01 +0200)]
Fix typo

3 years agoAdded F32::EPSILON and F64::EPSILON to paths.rs
Bastian [Tue, 25 Aug 2020 11:41:39 +0000 (13:41 +0200)]
Added F32::EPSILON and F64::EPSILON to paths.rs

3 years agoFix intermittent build error
Michael Wright [Tue, 25 Aug 2020 03:53:28 +0000 (05:53 +0200)]
Fix intermittent build error

The fmt test will cause clippy dev to be compiled and run. The clippy dev
dependencies are currently stored at `target/debug/deps` when this happens.
This location sometimes causes conflicts with ui tests which result in the
build error "thread 'compile_test' panicked at 'Found multiple rlibs for crate
`regex` ...".

This commit forces the clippy_dev dependencies to be stored under
`clippy_dev/target/` which seems to resolve this problem.