Wilco Kusee
f38fb56baf
Limit infinite_iter collect() check to known types
2018-12-31 13:38:31 +01:00
bors
85ba5f0f17
Auto merge of #3608 - phansch:improve_util_docs, r=oli-obk
...
Some improvements to util documentation
None
2018-12-31 12:03:28 +00:00
Philipp Hansch
cc76384807
Some improvements to util documentation
2018-12-31 12:12:50 +01:00
bors
f2fd8e71e9
Auto merge of #3606 - detrumi:blacklisted_name_hashset, r=phansch
...
Use hashset in `blacklisted_name` lint
2018-12-31 10:22:06 +00:00
Wilco Kusee
d1dfd3e96f
Use hashset for name blacklist
2018-12-31 10:44:27 +01:00
bors
6f3912850a
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.
2018-12-31 09:25:18 +00:00
bors
529f698c23
Auto merge of #3599 - xfix:use-hash-set-for-valid-idents, r=oli-obk
...
Use an FxHashSet for valid idents in documentation lint
2018-12-30 17:46:01 +00:00
bors
39bd84494f
Auto merge of #3605 - phansch:small_methods_ui_test_improvement, r=flip1995
...
UI test cleanup: Extract iter_skip_next from methods.rs
cc #2038
2018-12-30 16:00:15 +00:00
Konrad Borowski
11b957e18d
Reformat random_state tests
2018-12-30 14:29:43 +01:00
Philipp Hansch
8c4c458ee9
UI test cleanup: Extract iter_skip_next from methods.rs
...
cc #2038
2018-12-30 13:46:21 +01:00
Konrad Borowski
978e3ac2cf
Use node_id_to_type_opt instead of node_it_to_type in random_state
2018-12-30 13:40:27 +01:00
bors
61bfb39e3f
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`
2018-12-30 11:45:38 +00:00
bors
735607c1f9
Auto merge of #3588 - detrumi:tuple_struct_use_self, r=phansch
...
`use_self` for tuple structs
Fixes #3498
2018-12-30 11:12:55 +00:00
Max Taldykin
911a752561
Check pattern equality while checking declaration equality
2018-12-30 14:01:56 +03:00
Konrad Borowski
1130bbc26f
Merge branch 'master' of https://github.com/rust-lang/rust-clippy into random-state-lint
2018-12-30 11:43:20 +01:00
bors
aee138a7cf
Auto merge of #3597 - xfix:match-ergonomics, r=phansch
...
Match ergonomics (lints from A to B)
2018-12-30 10:40:36 +00:00
bors
ad2a4ef4bb
Auto merge of #3602 - matthiaskrgr:rustup, r=phansch
...
rustup https://github.com/rust-lang/rust/pull/56225/
item.name -> item.ident.name
2018-12-30 09:55:09 +00:00
Wilco Kusee
259ec2dc0e
Update test output after rebase
2018-12-30 08:23:39 +01:00
Wilco Kusee
1d10de66de
Remove false negatives from known problems
2018-12-30 08:23:39 +01:00
Wilco Kusee
ab42ba4f54
Implement use_self for tuple structs
2018-12-30 08:23:38 +01:00
Wilco Kusee
0f3dcdc3aa
Document known problems
2018-12-30 08:20:49 +01:00
Konrad Borowski
a6c4eaa93c
random_state lint
2018-12-30 02:45:34 +01:00
Matthias Krüger
e590025f61
rustup https://github.com/rust-lang/rust/pull/56225/
...
item.name -> item.ident.name
2018-12-30 01:09:24 +01:00
Konrad Borowski
815e434a1f
Move constant write checks to temporary_assignment lint
...
They make more sense here
2018-12-30 00:25:09 +01:00
bors
ece8b8e7d6
Auto merge of #3598 - xfix:apply-cargo-fix-edition-idioms, r=phansch
...
Apply cargo fix --edition-idioms fixes
2018-12-29 19:04:11 +00:00
bors
6cba3da727
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.
2018-12-29 17:31:35 +00:00
Konrad Borowski
ab70e0e742
Use an FxHashSet for valid idents in documentation lint
2018-12-29 18:08:53 +01:00
Konrad Borowski
177c639e65
Remove unnecessary use
statements after cargo fix
2018-12-29 17:48:21 +01:00
Konrad Borowski
0edb49792f
Apply cargo fix --edition-idioms fixes
2018-12-29 17:46:25 +01:00
Konrad Borowski
aeabb890d6
Use match ergonomics for booleans lint
2018-12-29 17:38:15 +01:00
Konrad Borowski
13c857b745
Use match ergonomics for block_in_if_condition lint
2018-12-29 17:32:09 +01:00
Konrad Borowski
fe151ebb9c
Use match ergonomics for bit_mask lint
2018-12-29 17:31:32 +01:00
Konrad Borowski
931e2b0026
Use match ergonomics for attrs lint
2018-12-29 17:29:50 +01:00
Konrad Borowski
3bf71a8e62
Use match ergonomics for assign_ops lint
2018-12-29 17:27:26 +01:00
Konrad Borowski
79cd95cf35
Use match ergonomics for artithmetic lint
2018-12-29 17:25:45 +01:00
Konrad Borowski
0ddb628488
Use match ergonomics for approx_const lint
2018-12-29 17:25:07 +01:00
bors
4d60841205
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.
2018-12-29 16:15:57 +00:00
bors
a7fe5afc2e
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.
2018-12-29 15:53:43 +00:00
Konrad Borowski
3f62fc3a7e
Remove crate:: prefixes from crate paths
...
This is somewhat misleading, as those are actually external crates,
and don't need a crate:: prefix.
2018-12-29 16:05:49 +01:00
Konrad Borowski
9fe8a3e52e
Support array indexing expressions in unused write to a constant
2018-12-29 15:34:15 +01:00
Konrad Borowski
847898f18f
Mark writes to constants as side-effect-less
2018-12-29 15:18:51 +01:00
bors
c93702495e
Auto merge of #3592 - xfix:remove-unsafe-from-consts-clippy-lints, r=flip1995
...
Remove unsafe from consts clippy lints
2018-12-29 09:32:25 +00:00
Michael Wright
f4cf82ce7d
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`
2018-12-29 07:59:33 +02:00
Konrad Borowski
44bf8e0c3d
Remove unsafe from consts clippy lints
2018-12-29 00:50:03 +01:00
bors
3c4abb5b80
Auto merge of #3561 - fuerstenau:master, r=oli-obk
...
Suggest `.as_ref()?` instead of `?` in certain circumstances.
2018-12-28 20:32:42 +00:00
Philipp Hansch
298aedf2f8
Fix suggestion for unnecessary_ref lint
2018-12-28 20:54:29 +01:00
Philipp Hansch
3f978afe8d
Update CONTRIBUTING.md for rustfix tests
2018-12-28 20:53:44 +01:00
Philipp Hansch
7d9bf99df1
Update .fixed files via update-references.sh
2018-12-28 20:53:44 +01:00
Philipp Hansch
2ccfd52f5d
Run rustfix on first UI test
2018-12-28 20:53:43 +01:00
Philipp Hansch
bd74fdce22
Use WIP branch for compiletest_rs
2018-12-28 20:53:01 +01:00