]> git.lizzy.rs Git - rust.git/log
rust.git
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 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

5 years agoUI test cleanup: Extract iter_skip_next from methods.rs
Philipp Hansch [Sun, 30 Dec 2018 11:41:37 +0000 (12:41 +0100)]
UI test cleanup: Extract iter_skip_next from methods.rs

cc #2038

5 years agoUse node_id_to_type_opt instead of node_it_to_type in random_state
Konrad Borowski [Sun, 30 Dec 2018 12:40:27 +0000 (13:40 +0100)]
Use node_id_to_type_opt instead of node_it_to_type in random_state

5 years agoAuto merge of #3593 - mikerite:readme-syspath-2, r=phansch
bors [Sun, 30 Dec 2018 11:45:38 +0000 (11:45 +0000)]
Auto merge of #3593 - mikerite:readme-syspath-2, r=phansch

Update README local run command to remove syspath

Since #3257 was reverted, including the sysroot in RUSTFLAGS gives the
error `Option 'sysroot' given more than once`

5 years agoAuto merge of #3588 - detrumi:tuple_struct_use_self, r=phansch
bors [Sun, 30 Dec 2018 11:12:55 +0000 (11:12 +0000)]
Auto merge of #3588 - detrumi:tuple_struct_use_self, r=phansch

`use_self` for tuple structs

Fixes #3498

5 years agoCheck pattern equality while checking declaration equality
Max Taldykin [Thu, 27 Dec 2018 17:11:25 +0000 (20:11 +0300)]
Check pattern equality while checking declaration equality

5 years agoMerge branch 'master' of https://github.com/rust-lang/rust-clippy into random-state...
Konrad Borowski [Sun, 30 Dec 2018 10:43:20 +0000 (11:43 +0100)]
Merge branch 'master' of https://github.com/rust-lang/rust-clippy into random-state-lint

5 years agoAuto merge of #3597 - xfix:match-ergonomics, r=phansch
bors [Sun, 30 Dec 2018 10:40:36 +0000 (10:40 +0000)]
Auto merge of #3597 - xfix:match-ergonomics, r=phansch

Match ergonomics (lints from A to B)

5 years agoAuto merge of #3602 - matthiaskrgr:rustup, r=phansch
bors [Sun, 30 Dec 2018 09:55:09 +0000 (09:55 +0000)]
Auto merge of #3602 - matthiaskrgr:rustup, r=phansch

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

item.name -> item.ident.name

5 years agoUpdate test output after rebase
Wilco Kusee [Fri, 28 Dec 2018 19:49:19 +0000 (20:49 +0100)]
Update test output after rebase

5 years agoRemove false negatives from known problems
Wilco Kusee [Fri, 28 Dec 2018 12:41:33 +0000 (13:41 +0100)]
Remove false negatives from known problems

5 years agoImplement use_self for tuple structs
Wilco Kusee [Thu, 27 Dec 2018 16:27:42 +0000 (17:27 +0100)]
Implement use_self for tuple structs

5 years agoDocument known problems
Wilco Kusee [Thu, 27 Dec 2018 08:54:19 +0000 (09:54 +0100)]
Document known problems

5 years agorandom_state lint
Konrad Borowski [Sun, 30 Dec 2018 01:43:56 +0000 (02:43 +0100)]
random_state lint

5 years agorustup https://github.com/rust-lang/rust/pull/56225/
Matthias Krüger [Sun, 30 Dec 2018 00:09:24 +0000 (01:09 +0100)]
rustup https://github.com/rust-lang/rust/pull/56225/

item.name -> item.ident.name

5 years agoMove constant write checks to temporary_assignment lint
Konrad Borowski [Sat, 29 Dec 2018 23:18:55 +0000 (00:18 +0100)]
Move constant write checks to temporary_assignment lint

They make more sense here

5 years agoAuto merge of #3598 - xfix:apply-cargo-fix-edition-idioms, r=phansch
bors [Sat, 29 Dec 2018 19:04:11 +0000 (19:04 +0000)]
Auto merge of #3598 - xfix:apply-cargo-fix-edition-idioms, r=phansch

Apply cargo fix --edition-idioms fixes

5 years agoAuto merge of #3558 - russelltg:new_without_default_merge, r=flip1995
bors [Sat, 29 Dec 2018 17:31:35 +0000 (17:31 +0000)]
Auto merge of #3558 - russelltg:new_without_default_merge, r=flip1995

Merge new_without_default_derive into new_without_default

Closes #3525, deprecating new_without_default_derive and moving both lints into new_without_default.

5 years agoUse an FxHashSet for valid idents in documentation lint
Konrad Borowski [Sat, 29 Dec 2018 17:07:10 +0000 (18:07 +0100)]
Use an FxHashSet for valid idents in documentation lint

5 years agoRemove unnecessary `use` statements after `cargo fix`
Konrad Borowski [Sat, 29 Dec 2018 16:48:00 +0000 (17:48 +0100)]
Remove unnecessary `use` statements after `cargo fix`

5 years agoApply cargo fix --edition-idioms fixes
Konrad Borowski [Sat, 29 Dec 2018 16:46:25 +0000 (17:46 +0100)]
Apply cargo fix --edition-idioms fixes

5 years agoUse match ergonomics for booleans lint
Konrad Borowski [Sat, 29 Dec 2018 16:34:56 +0000 (17:34 +0100)]
Use match ergonomics for booleans lint

5 years agoUse match ergonomics for block_in_if_condition lint
Konrad Borowski [Sat, 29 Dec 2018 16:32:09 +0000 (17:32 +0100)]
Use match ergonomics for block_in_if_condition lint

5 years agoUse match ergonomics for bit_mask lint
Konrad Borowski [Sat, 29 Dec 2018 16:31:32 +0000 (17:31 +0100)]
Use match ergonomics for bit_mask lint

5 years agoUse match ergonomics for attrs lint
Konrad Borowski [Sat, 29 Dec 2018 16:29:50 +0000 (17:29 +0100)]
Use match ergonomics for attrs lint

5 years agoUse match ergonomics for assign_ops lint
Konrad Borowski [Sat, 29 Dec 2018 16:27:26 +0000 (17:27 +0100)]
Use match ergonomics for assign_ops lint

5 years agoUse match ergonomics for artithmetic lint
Konrad Borowski [Sat, 29 Dec 2018 16:25:45 +0000 (17:25 +0100)]
Use match ergonomics for artithmetic lint

5 years agoUse match ergonomics for approx_const lint
Konrad Borowski [Sat, 29 Dec 2018 16:25:07 +0000 (17:25 +0100)]
Use match ergonomics for approx_const lint

5 years agoAuto merge of #3596 - xfix:remove-crate-from-paths, r=flip1995
bors [Sat, 29 Dec 2018 16:15:57 +0000 (16:15 +0000)]
Auto merge of #3596 - xfix:remove-crate-from-paths, r=flip1995

Remove crate:: prefixes from crate paths

This is somewhat misleading, as those are actually external crates,
and don't need a crate:: prefix.

5 years agoAuto merge of #3595 - xfix:mark-writes-to-constant-as-sideeffectless, r=oli-obk
bors [Sat, 29 Dec 2018 15:53:43 +0000 (15:53 +0000)]
Auto merge of #3595 - xfix:mark-writes-to-constant-as-sideeffectless, r=oli-obk

Mark writes to constants as side-effect-less

This is my first real contribution, so I probably did it wrong.

5 years agoRemove crate:: prefixes from crate paths
Konrad Borowski [Sat, 29 Dec 2018 15:04:45 +0000 (16:04 +0100)]
Remove crate:: prefixes from crate paths

This is somewhat misleading, as those are actually external crates,
and don't need a crate:: prefix.