]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #3657 - roblabla:bugfix-missing-docs-global-asm, r=phansch
bors [Mon, 14 Jan 2019 14:50:27 +0000 (14:50 +0000)]
Auto merge of #3657 - roblabla:bugfix-missing-docs-global-asm, r=phansch

Missing docs: don't require documenting Global Asm items.

global_asm! items cannot be documented, the lint still gets triggered after adding documentation to the macro invocation. Furthermore, even if we could add documentation to the AST node, rustdoc doesn't render it anyways.

Playground example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=5182df182f0ffbbab4c3107e43368ac3

5 years agoAuto merge of #3653 - gendx:master, r=phansch
bors [Mon, 14 Jan 2019 09:16:20 +0000 (09:16 +0000)]
Auto merge of #3653 - gendx:master, r=phansch

Fix typos in clippy_lints/src/len_zero.rs

Some comments in the len_zero lint had typos.

5 years agoAuto merge of #3658 - detrumi:add-several-run-rustfix-annotations, r=phansch
bors [Mon, 14 Jan 2019 08:16:51 +0000 (08:16 +0000)]
Auto merge of #3658 - detrumi:add-several-run-rustfix-annotations, r=phansch

Add several run rustfix annotations

Adds `run-rustfix` to 18 of the tests from the tracking issue #3630.
Each test has its own commit, to make reviewing easier (hopefully this is easier to review than 18 separate PRs).

## Changes
- `cfg_attr_rustfmt`: Custom inner attributes are unstable. Let's disable the lint for inner attributes until [#54726](https://github.com/rust-lang/rust/issues/54726) stabilizes
- `collapsible_if`: unrelated cyclomatic_complexity warning that can be ignored
- `duration_subsec`: Simply needed `#![allow(dead_code)]`
- `excessive_precision`: Fixed by `#!allow(dead_code,unused_variables)`
- `explicit_write`: Fixed by `#![allow(unused_imports)]`
- `inconsistent_digit_grouping`: Avoid triggering `clippy::excessive_precision` lint
- `infallible_destructuring_match`: Fixed by `#![allow(dead_code, unreachable_code, unused_variables)]`
- `into_iter_on_ref`: Triggered unrelated `clippy::useless_vec` lint
- `large_digit_groups`: Avoid triggering `clippy::excessive_precision` lint
- `map_clone`: Fixed by `#![allow(clippy::iter_cloned_collect)]`
- `mem_replace`: Suggestion causes import to be unused, fixed by `#![allow(unused_imports)]`
- `precedence`: Allow some unrelated lints, and change out-of-range `0b1111_1111i8` literal
- `redundant_field_names`: Allow dead code, and remove stabilized feature toggles
- `replace_consts`: Fixed by `#![allow(unused_variables)]`
- `starts_ends_with`: Fixed by `#![allow(unused_must_use)]`
- `types`: Fixed by `#![allow(dead_code, unused_variables)]`
- `unit_arg`: Fixed by `#[allow(unused_must_use)]`
- `unnecessary_fold`: Fixed by adding type annotations and adding `#![allow(dead_code)]`

5 years agoAdd run-rustfix to unnecessary_fold
Wilco Kusee [Sun, 13 Jan 2019 19:03:22 +0000 (20:03 +0100)]
Add run-rustfix to unnecessary_fold

5 years agoAdd run-rustfix to unit_arg test
Wilco Kusee [Sun, 13 Jan 2019 18:59:00 +0000 (19:59 +0100)]
Add run-rustfix to unit_arg test

5 years agoAdd run-rustfix for types test
Wilco Kusee [Sun, 13 Jan 2019 18:57:19 +0000 (19:57 +0100)]
Add run-rustfix for types test

5 years agoAdd run-rustfix to starts_ends_with
Wilco Kusee [Sun, 13 Jan 2019 18:40:14 +0000 (19:40 +0100)]
Add run-rustfix to starts_ends_with

5 years agoAdd run-rustfix to replace_const test
Wilco Kusee [Sun, 13 Jan 2019 18:38:43 +0000 (19:38 +0100)]
Add run-rustfix to replace_const test

5 years agoAdd run-rustfix to redundant_field_names
Wilco Kusee [Sun, 13 Jan 2019 17:48:54 +0000 (18:48 +0100)]
Add run-rustfix to redundant_field_names

5 years agoMissing docs: don't require documenting Global Asm items.
roblabla [Sun, 13 Jan 2019 16:09:58 +0000 (16:09 +0000)]
Missing docs: don't require documenting Global Asm items.

global_asm! items cannot be documented, the lint still gets triggered
after adding documentation to the macro invocation. Furthermore, even
if we could add documentation to the AST node, rustdoc doesn't render
it anyways.

Playground example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=5182df182f0ffbbab4c3107e43368ac3

5 years agoAdd run-rustfix for precedence test
Wilco Kusee [Sun, 13 Jan 2019 13:24:21 +0000 (14:24 +0100)]
Add run-rustfix for precedence test

5 years agoAdd run-rustfix to mem_replace test
Wilco Kusee [Sun, 13 Jan 2019 12:55:26 +0000 (13:55 +0100)]
Add run-rustfix to mem_replace test

5 years agoAdd run-rustfix to map_clone test
Wilco Kusee [Sun, 13 Jan 2019 12:10:25 +0000 (13:10 +0100)]
Add run-rustfix to map_clone test

5 years agoAdd run-rustfix to large_digit_groups
Wilco Kusee [Sun, 13 Jan 2019 11:57:13 +0000 (12:57 +0100)]
Add run-rustfix to large_digit_groups

5 years agoAdd run-rustfix to into_iter_on_ref
Wilco Kusee [Sun, 13 Jan 2019 11:52:51 +0000 (12:52 +0100)]
Add run-rustfix to into_iter_on_ref

5 years agoAdd run-rustfix to infallible_destructuring_match
Wilco Kusee [Sun, 13 Jan 2019 11:49:54 +0000 (12:49 +0100)]
Add run-rustfix to infallible_destructuring_match

5 years agoAdd rustfix to inconsistent_digit_grouping test
Wilco Kusee [Sun, 13 Jan 2019 11:43:10 +0000 (12:43 +0100)]
Add rustfix to inconsistent_digit_grouping test

5 years agoAdd run-rustfix to explicit_write test
Wilco Kusee [Sun, 13 Jan 2019 11:22:59 +0000 (12:22 +0100)]
Add run-rustfix to explicit_write test

5 years agoAuto merge of #3655 - manaskarekar:patch-1, r=flip1995
bors [Sun, 13 Jan 2019 11:21:24 +0000 (11:21 +0000)]
Auto merge of #3655 - manaskarekar:patch-1, r=flip1995

Update Readme for (arguably) better readability

Move final instruction to run clippy into a third step in the Readme so it's easier to spot at a quick glance.

5 years agoAdd run-rustfix to excessive_precision test
Wilco Kusee [Sun, 13 Jan 2019 11:09:30 +0000 (12:09 +0100)]
Add run-rustfix to excessive_precision test

5 years agoAdd run-rustfix to duration_subsec test
Wilco Kusee [Sun, 13 Jan 2019 11:06:28 +0000 (12:06 +0100)]
Add run-rustfix to duration_subsec test

5 years agoDisable deprecated_cfg_attr lint for inner attributes
Wilco Kusee [Sun, 13 Jan 2019 10:53:43 +0000 (11:53 +0100)]
Disable deprecated_cfg_attr lint for inner attributes

5 years agoAdd run-rustfix to collapsible_if test
Wilco Kusee [Sun, 13 Jan 2019 10:44:45 +0000 (11:44 +0100)]
Add run-rustfix to collapsible_if test

5 years agoUpdate Readme
Manas Karekar [Sun, 13 Jan 2019 01:24:52 +0000 (20:24 -0500)]
Update Readme

Move instruction to the correct step for installing Clippy.

5 years agoUpdate Readme for (arguably) better readability
Manas Karekar [Sun, 13 Jan 2019 00:42:36 +0000 (19:42 -0500)]
Update Readme for (arguably) better readability

Move final instruction to run clippy into a third step in the Readme so it's easier to spot at a quick glance.

5 years agoAuto merge of #3654 - matthiaskrgr:rustup, r=phansch
bors [Sat, 12 Jan 2019 15:33:08 +0000 (15:33 +0000)]
Auto merge of #3654 - matthiaskrgr:rustup, r=phansch

rustup: the features if_while_or_patterns has been stabilized

5 years agorustup: the features if_while_or_patterns has been stabilized
Matthias Krüger [Sat, 12 Jan 2019 15:11:17 +0000 (16:11 +0100)]
rustup: the features if_while_or_patterns has been stabilized

5 years agoAuto merge of #3646 - matthiaskrgr:travis, r=phansch
bors [Fri, 11 Jan 2019 01:11:34 +0000 (01:11 +0000)]
Auto merge of #3646 - matthiaskrgr:travis, r=phansch

readme: update travis badge to reflect migration from travis-ci.org to travis-ci.com

5 years agoFix comments in clippy_lints/src/len_zero.rs
Guillaume Endignoux [Thu, 10 Jan 2019 21:48:40 +0000 (22:48 +0100)]
Fix comments in clippy_lints/src/len_zero.rs

5 years agoAuto merge of #3645 - phansch:remove_copyright_headers, r=oli-obk
bors [Wed, 9 Jan 2019 21:53:55 +0000 (21:53 +0000)]
Auto merge of #3645 - phansch:remove_copyright_headers, r=oli-obk

Remove all copyright license headers

Discussion previously happened in https://github.com/rust-lang/rust/pull/43498 and here: https://github.com/rust-lang/rust-clippy/pull/3642#issuecomment-452251727

5 years agoreadme: update travis badge to reflect migration from travis-ci.org to travis-ci.com
Matthias Krüger [Tue, 8 Jan 2019 23:50:32 +0000 (00:50 +0100)]
readme: update travis badge to reflect migration from travis-ci.org to travis-ci.com

5 years agoRemove all copyright license headers
Philipp Hansch [Mon, 7 Jan 2019 21:33:18 +0000 (22:33 +0100)]
Remove all copyright license headers

Discussion previously happened in https://github.com/rust-lang/rust/pull/43498

5 years agoAuto merge of #3640 - detrumi:nested_use_self, r=flip1995
bors [Mon, 7 Jan 2019 18:54:28 +0000 (18:54 +0000)]
Auto merge of #3640 - detrumi:nested_use_self, r=flip1995

Restrict `use_self` on nested items

Fixes #3637
Fixes #3463

These changes make it so that nested items aren't visited any more by the `use_self` lint.

I think visiting nested items should be possible (so that it uses a different `item_path` for the nested item), but I'm not sure whether it's viable and what the best approach would be.
- Can `item_path` be changed to a new `Self` path before visiting the item, and then changing it back afterwards?
- Alternatively, could a new visitor be created, re-using `check_trait_method_impl_decl`?

5 years agoAuto merge of #3600 - xfix:cast-ref-to-mut, r=flip1995
bors [Mon, 7 Jan 2019 18:30:53 +0000 (18:30 +0000)]
Auto merge of #3600 - xfix:cast-ref-to-mut, r=flip1995

cast_ref_to_mut lint

I see this pattern way too often, and it's completely wrong. In fact, due to how common this incorrect pattern is, [the Rustonomicon specifically points this out](https://doc.rust-lang.org/nomicon/transmutes.html).

> - Transmuting an & to &mut is UB
>   - Transmuting an & to &mut is always UB
>   - No you can't do it
>   - No you're not special

This is my first lint.

5 years agoAuto merge of #3641 - hellow554:patch-1, r=flip1995
bors [Mon, 7 Jan 2019 17:50:48 +0000 (17:50 +0000)]
Auto merge of #3641 - hellow554:patch-1, r=flip1995

Add missing ` in default lint

5 years agoMove cast_ref_to_mut list to correctness group
Konrad Borowski [Mon, 7 Jan 2019 13:39:56 +0000 (14:39 +0100)]
Move cast_ref_to_mut list to correctness group

5 years agoRustftmt
Wilco Kusee [Mon, 7 Jan 2019 13:38:01 +0000 (14:38 +0100)]
Rustftmt

5 years agoDon't import ty::Ref in cast_ref_to_mut lint
Konrad Borowski [Sun, 30 Dec 2018 12:12:28 +0000 (13:12 +0100)]
Don't import ty::Ref in cast_ref_to_mut lint

5 years agoMove a hint to an error message in cast_ref_to_mut lint
Konrad Borowski [Sun, 30 Dec 2018 12:11:53 +0000 (13:11 +0100)]
Move a hint to an error message in cast_ref_to_mut lint

This matches mem::transmute::<&T, &mut T> lint in rustc.

5 years agoAdd a note to cast_ref_to_mut lint
Konrad Borowski [Sun, 30 Dec 2018 12:06:37 +0000 (13:06 +0100)]
Add a note to cast_ref_to_mut lint

5 years agoUse ty::Ref instead of ty::TyKind::Ref
Konrad Borowski [Sun, 30 Dec 2018 12:02:58 +0000 (13:02 +0100)]
Use ty::Ref instead of ty::TyKind::Ref

5 years agocast_ref_to_mut lint
Konrad Borowski [Sat, 29 Dec 2018 18:25:27 +0000 (19:25 +0100)]
cast_ref_to_mut lint

5 years agoAdd missing ` in default lint
Marcel Hellwig [Mon, 7 Jan 2019 13:32:32 +0000 (14:32 +0100)]
Add missing ` in default lint

5 years agoImprove tests and exclude nested impls
Wilco Kusee [Mon, 7 Jan 2019 13:11:53 +0000 (14:11 +0100)]
Improve tests and exclude nested impls

5 years agoAuto merge of #3638 - mikerite:fix-3625, r=oli-obk
bors [Mon, 7 Jan 2019 08:41:43 +0000 (08:41 +0000)]
Auto merge of #3638 - mikerite:fix-3625, r=oli-obk

Improve `get_unwrap` suggestion

Handle case where a reference is immediately dereferenced.

Fixes #3625

5 years agoUpdate `unwrap_get` code review suggestions
Michael Wright [Mon, 7 Jan 2019 04:22:39 +0000 (06:22 +0200)]
Update `unwrap_get` code review suggestions

5 years agoUpdate known problems
Wilco Kusee [Sun, 6 Jan 2019 14:41:02 +0000 (15:41 +0100)]
Update known problems

5 years agoRestrict use_self on nested items
Wilco Kusee [Sun, 6 Jan 2019 14:05:04 +0000 (15:05 +0100)]
Restrict use_self on nested items

5 years agoImprove `get_unwrap` suggestion
Michael Wright [Sun, 6 Jan 2019 09:46:03 +0000 (11:46 +0200)]
Improve `get_unwrap` suggestion

Handle case where a reference is immediately dereferenced.

Fixes 3625

5 years agoAuto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix
bors [Sat, 5 Jan 2019 14:04:31 +0000 (14:04 +0000)]
Auto merge of #3635 - matthiaskrgr:revert_random_state_3603, r=xfix

Revert the random_state lint.

Remove the random_state lint until it or rustc has been fixed to no longer crash with debug assertions (see #3628)
We can't update clippy in the rustc repo because of this which is blocking nightlies because toolstate is already broken.

fixes #3628

5 years agoAuto merge of #3626 - phansch:rustfix_works, r=oli-obk
bors [Sat, 5 Jan 2019 12:14:30 +0000 (12:14 +0000)]
Auto merge of #3626 - phansch:rustfix_works, r=oli-obk

Add run-rustfix where it already works

This PR adds `// run-rustfix` headers to tests for `MachineApplicable` lints where
applying the suggestions works without any errors.

5 years agoRevert "tests: used_underscore_binding_macro: disable random_state lint."
Matthias Krüger [Sat, 5 Jan 2019 09:20:37 +0000 (10:20 +0100)]
Revert "tests: used_underscore_binding_macro: disable random_state lint."

This reverts commit 2b80829fe0311fc5cdbc731fa0b67f103db4c004.

5 years agoRevert "Auto merge of #3603 - xfix:random-state-lint, r=phansch"
Matthias Krüger [Sat, 5 Jan 2019 09:19:04 +0000 (10:19 +0100)]
Revert "Auto merge of #3603 - xfix:random-state-lint, r=phansch"

This reverts commit 0a6593cd1b12c06d4ff2f2ad0ccf20e77f1ec5f6, reversing
changes made to 5277a1fb6c1be42ec0c57a6f60d82fc18a962259.

This hopefully fixes #3628

5 years agoAuto merge of #3627 - detrumi:use_self_local_macro, r=phansch
bors [Sat, 5 Jan 2019 08:51:13 +0000 (08:51 +0000)]
Auto merge of #3627 - detrumi:use_self_local_macro, r=phansch

Trigger `use_self` lint in local macros

Closes #2098

The test currently only covers local macros. #2098 suggested this:
> You could add the macro in question into the `mini_macro` subcrate

But that doesn't work for a `macro_rules`:
```
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
```

So I suggest leaving out the test for external macros, as using `in_external_macro` seems straigtforward enough. Alternatives would be to use to add an additional crate (overkill if you ask me), or test with a `proc-macro`.

5 years agoAuto merge of #3610 - phansch:method_rs_cleanup, r=flip1995
bors [Sat, 5 Jan 2019 08:29:25 +0000 (08:29 +0000)]
Auto merge of #3610 - phansch:method_rs_cleanup, r=flip1995

UI test cleanup: Extract lint from methods.rs test

Extracts the `result_map_unwrap_or_else` lint into a separate test file.

This also extracts the `IteratorFalsePositives` struct and impl into
`auxiliary/option_helpers.rs`.

cc #2038

5 years agoAuto merge of #3633 - matthiaskrgr:rustup, r=phansch
bors [Sat, 5 Jan 2019 08:02:50 +0000 (08:02 +0000)]
Auto merge of #3633 - matthiaskrgr:rustup, r=phansch

rustup (don't know the exact PR unfortunately)

5 years agorustup https://github.com/rust-lang/rust/pull/56837
Matthias Krüger [Sat, 5 Jan 2019 07:21:56 +0000 (08:21 +0100)]
rustup https://github.com/rust-lang/rust/pull/56837

5 years agorustup (don't know the exact PR unfortunately)
Matthias Krüger [Sat, 5 Jan 2019 00:12:33 +0000 (01:12 +0100)]
rustup (don't know the exact PR unfortunately)

5 years agoAuto merge of #3631 - phansch:add_itertools_to_integration_tests, r=phansch
bors [Fri, 4 Jan 2019 18:05:17 +0000 (18:05 +0000)]
Auto merge of #3631 - phansch:add_itertools_to_integration_tests, r=phansch

Add itertools to integration tests

Mainly because it causes an ICE in https://github.com/rust-lang/rust/issues/57298
and it's a good library to test anyway.

5 years agoAuto merge of #3629 - matthiaskrgr:crash_workaround, r=phansch
bors [Fri, 4 Jan 2019 17:40:43 +0000 (17:40 +0000)]
Auto merge of #3629 - matthiaskrgr:crash_workaround, r=phansch

tests: used_underscore_binding_macro: disable random_state lint.

Trying to work around a crash (see https://github.com/rust-lang/rust-clippy/issues/3628) in
https://github.com/rust-lang/rust/pull/57303

5 years agoAdd itertools to integration tests
Philipp Hansch [Fri, 4 Jan 2019 17:01:44 +0000 (18:01 +0100)]
Add itertools to integration tests

5 years agotests: used_underscore_binding_macro: disable random_state lint.
Matthias Krüger [Fri, 4 Jan 2019 16:18:19 +0000 (17:18 +0100)]
tests: used_underscore_binding_macro: disable random_state lint.

Trying to work around a crash (see https://github.com/rust-lang/rust-clippy/issues/3628) in
https://github.com/rust-lang/rust/pull/57303

5 years agoAuto merge of #3601 - xfix:move-constant-write-lint, r=flip1995
bors [Fri, 4 Jan 2019 14:59:11 +0000 (14:59 +0000)]
Auto merge of #3601 - xfix:move-constant-write-lint, r=flip1995

Move constant write checks to temporary_assignment lint

They make more sense here

cc #3595

5 years agoTrigger `use_self` lint in local macros
Wilco Kusee [Fri, 4 Jan 2019 10:31:28 +0000 (11:31 +0100)]
Trigger `use_self` lint in local macros

5 years agoAdd run-rustfix where it already passes
Philipp Hansch [Fri, 4 Jan 2019 10:22:38 +0000 (11:22 +0100)]
Add run-rustfix where it already passes

5 years agoAuto merge of #3623 - phansch:rustup, r=flip1995
bors [Thu, 3 Jan 2019 22:29:09 +0000 (22:29 +0000)]
Auto merge of #3623 - phansch:rustup, r=flip1995

rustup: https://github.com/rust-lang/rust/pull/55517

None

5 years agorustup: https://github.com/rust-lang/rust/pull/55517
Philipp Hansch [Thu, 3 Jan 2019 20:54:57 +0000 (21:54 +0100)]
rustup: https://github.com/rust-lang/rust/pull/55517

5 years agoAuto merge of #3622 - m-cat:master, r=phansch
bors [Thu, 3 Jan 2019 19:49:07 +0000 (19:49 +0000)]
Auto merge of #3622 - m-cat:master, r=phansch

Add ui/for_kv_map test for false positive in #1279

Fixes #1279

5 years agoAuto merge of #3621 - Zoxc:parallel, r=phansch
bors [Thu, 3 Jan 2019 19:27:32 +0000 (19:27 +0000)]
Auto merge of #3621 - Zoxc:parallel, r=phansch

Make clippy work with parallel rustc

5 years agoMake clippy work with parallel rustc
John Kåre Alsaker [Thu, 3 Jan 2019 17:17:43 +0000 (18:17 +0100)]
Make clippy work with parallel rustc

5 years agoAdd ui/for_kv_map test for false positive in #1279
Marcin S [Thu, 3 Jan 2019 18:07:21 +0000 (19:07 +0100)]
Add ui/for_kv_map test for false positive in #1279

5 years agoAuto merge of #3519 - phansch:brave_newer_ui_tests, r=flip1995
bors [Thu, 3 Jan 2019 15:08:47 +0000 (15:08 +0000)]
Auto merge of #3519 - phansch:brave_newer_ui_tests, r=flip1995

Integrate rustfix into Clippy test suite

Once the [PR to compiletest-rs](https://github.com/laumann/compiletest-rs/pull/151) is reviewed and merged this fixes #2376.

I will create a separate tracking issue for adding `run-rustfix` to all tests.

5 years agoUpdate to latest compiletest-rs release
Philipp Hansch [Thu, 3 Jan 2019 14:42:59 +0000 (15:42 +0100)]
Update to latest compiletest-rs release

5 years agoAuto merge of #3617 - matthiaskrgr:3462_test, r=phansch
bors [Thu, 3 Jan 2019 11:23:57 +0000 (11:23 +0000)]
Auto merge of #3617 - matthiaskrgr:3462_test, r=phansch

add testcase for #3462

5 years agoadd testcase for #3462
Matthias Krüger [Thu, 3 Jan 2019 10:08:05 +0000 (11:08 +0100)]
add testcase for #3462

5 years agoAuto merge of #3615 - matthiaskrgr:rtuVbump, r=phansch
bors [Thu, 3 Jan 2019 07:20:23 +0000 (07:20 +0000)]
Auto merge of #3615 - matthiaskrgr:rtuVbump, r=phansch

deps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case...

I'm surprised there is no warning since the root cargo.toml specifies 0.1.0 but the subcrate toml actually states 0.1.1.

I should have noticed this in previous pull request but oh well...

5 years agodeps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case...
Matthias Krüger [Thu, 3 Jan 2019 02:19:15 +0000 (03:19 +0100)]
deps: bump rustc_tools_util version from 0.1.0 to 0.1.1 just in case...

5 years agoAuto merge of #3603 - xfix:random-state-lint, r=phansch
bors [Thu, 3 Jan 2019 02:00:46 +0000 (02:00 +0000)]
Auto merge of #3603 - xfix:random-state-lint, r=phansch

random_state lint

5 years agoAuto merge of #3614 - matthiaskrgr:rustc_tool_utils, r=phansch
bors [Thu, 3 Jan 2019 01:06:53 +0000 (01:06 +0000)]
Auto merge of #3614 - matthiaskrgr:rustc_tool_utils, r=phansch

rustc_tool_utils: fix failure to create proper non-repo version string when used in crates on crates.io, bump version

5 years agoAuto merge of #3607 - detrumi:limit_infinite_iter_to_known_types, r=phansch
bors [Thu, 3 Jan 2019 00:12:02 +0000 (00:12 +0000)]
Auto merge of #3607 - detrumi:limit_infinite_iter_to_known_types, r=phansch

Only trigger `infinite_iter` lint for infinitely allocating `collect()` calls

Fixes  #3538

~Oh, I guess this should actually check other methods like `count` as well, not only `collect()`.~
Never mind, `collect` is the only of these functions that allocates a data structure.

5 years agoUse compiletest's aux-build header instead of include macro
Philipp Hansch [Wed, 2 Jan 2019 21:48:44 +0000 (22:48 +0100)]
Use compiletest's aux-build header instead of include macro

5 years agorustc_tool_utils: fix failure to create proper non-repo version string when used...
Matthias Krüger [Wed, 2 Jan 2019 19:12:15 +0000 (20:12 +0100)]
rustc_tool_utils: fix failure to create proper non-repo version string when used in crates on crates.io, bump version

5 years agoAuto merge of #3609 - codeworm96:fix_test, r=phansch
bors [Wed, 2 Jan 2019 16:40:10 +0000 (16:40 +0000)]
Auto merge of #3609 - codeworm96:fix_test, r=phansch

Fix test for rust-lang/rust#57250

Part of rust-lang/rust#57250.
~~Do not merge. Waiting a nightly with that PR merged.~~

5 years agoAuto merge of #3612 - phansch:copies_cleanup, r=flip1995
bors [Wed, 2 Jan 2019 13:20:38 +0000 (13:20 +0000)]
Auto merge of #3612 - phansch:copies_cleanup, r=flip1995

UI test cleanup: Extract ifs_same_cond tests

cc #2038

5 years agoAuto merge of #3611 - phansch:some_for_loop_cleanup, r=flip1995
bors [Wed, 2 Jan 2019 12:12:09 +0000 (12:12 +0000)]
Auto merge of #3611 - phansch:some_for_loop_cleanup, r=flip1995

UI test cleanup: Extract for_kv_map lint tests

cc #2038

5 years agorustfmt
Philipp Hansch [Wed, 2 Jan 2019 07:15:32 +0000 (08:15 +0100)]
rustfmt

5 years agoUI test cleanup: Extract ifs_same_cond tests
Philipp Hansch [Wed, 2 Jan 2019 06:59:48 +0000 (07:59 +0100)]
UI test cleanup: Extract ifs_same_cond tests

5 years agoExtract IteratorFalsePositives into option_helpers.rs
Philipp Hansch [Wed, 2 Jan 2019 06:27:47 +0000 (07:27 +0100)]
Extract IteratorFalsePositives into option_helpers.rs

This was previously duplicated in #3605

5 years agoUI test cleanup: Extract for_kv_map lint tests
Philipp Hansch [Wed, 2 Jan 2019 06:42:04 +0000 (07:42 +0100)]
UI test cleanup: Extract for_kv_map lint tests

5 years agoUI test cleanup: Extract lint from methods.rs test
Philipp Hansch [Wed, 2 Jan 2019 06:23:00 +0000 (07:23 +0100)]
UI test cleanup: Extract lint from methods.rs test

5 years agoFix test for rust-lang/rust#57250
Yuning Zhang [Wed, 2 Jan 2019 01:34:02 +0000 (20:34 -0500)]
Fix test for rust-lang/rust#57250

5 years agoLimit infinite_iter collect() check to known types
Wilco Kusee [Mon, 31 Dec 2018 11:06:08 +0000 (12:06 +0100)]
Limit infinite_iter collect() check to known types

5 years agoAuto merge of #3608 - phansch:improve_util_docs, r=oli-obk
bors [Mon, 31 Dec 2018 12:03:28 +0000 (12:03 +0000)]
Auto merge of #3608 - phansch:improve_util_docs, r=oli-obk

Some improvements to util documentation

None

5 years agoSome improvements to util documentation
Philipp Hansch [Mon, 31 Dec 2018 11:12:50 +0000 (12:12 +0100)]
Some improvements to util documentation

5 years agoAuto merge of #3606 - detrumi:blacklisted_name_hashset, r=phansch
bors [Mon, 31 Dec 2018 10:22:06 +0000 (10:22 +0000)]
Auto merge of #3606 - detrumi:blacklisted_name_hashset, r=phansch

Use hashset in `blacklisted_name` lint

5 years agoUse hashset for name blacklist
Wilco Kusee [Mon, 31 Dec 2018 09:44:27 +0000 (10:44 +0100)]
Use hashset for name blacklist

5 years agoAuto merge of #3590 - jorpic:i3559-if_same_then_else, r=phansch
bors [Mon, 31 Dec 2018 09:25:18 +0000 (09:25 +0000)]
Auto merge of #3590 - jorpic:i3559-if_same_then_else, r=phansch

Fix if_same_then_else false positive

This fixes false positive in #3559.
The problem was that `SpanlessEq` does not check patterns in declarations. So this two blocks considered equal.
```rust
if true {
    let (x, y) = foo();
} else {
   let (y, x) = foo();
}
```
Not sure if the proposed change is safe as `SpanlessEq` is used extensively in other lints, but I tried hard to come up with counterexample and failed.

5 years agoAuto merge of #3599 - xfix:use-hash-set-for-valid-idents, r=oli-obk
bors [Sun, 30 Dec 2018 17:46:01 +0000 (17:46 +0000)]
Auto merge of #3599 - xfix:use-hash-set-for-valid-idents, r=oli-obk

Use an FxHashSet for valid idents in documentation lint

5 years agoAuto merge of #3605 - phansch:small_methods_ui_test_improvement, r=flip1995
bors [Sun, 30 Dec 2018 16:00:15 +0000 (16:00 +0000)]
Auto merge of #3605 - phansch:small_methods_ui_test_improvement, r=flip1995

UI test cleanup: Extract iter_skip_next from methods.rs

cc #2038

5 years agoReformat random_state tests
Konrad Borowski [Sun, 30 Dec 2018 13:29:43 +0000 (14:29 +0100)]
Reformat random_state tests