Commit Graph

5429 Commits

Author SHA1 Message Date
bors
d3c747c752 Auto merge of #3569 - phansch:update_contributing, r=flip1995
Change contrib.md hierarchy, link to it from readme

'How Clippy works' and 'How to fix nightly failures' are not exactly part
of 'Writing code'.
2018-12-22 09:18:39 +00:00
Philipp Hansch
cef8f57082
Remove header link 2018-12-22 10:16:52 +01:00
Mark Nieweglowski
d395d45ca7 test: panic at map_unit_fn.rs:202 for map() without args 2018-12-22 01:06:02 -05:00
Mark Nieweglowski
a24853709a rm unused file map_unit_fn.stderr
There is no map_unit_fn.rs whose output would be diffed with map_unit_fn.stderr

map_unit_fn.stderr was renamed 8 months ago from option_map_unit_fn.stderr
but option_map_unit_fn.{stderr,rs} both remain and are in use.
2018-12-22 01:04:03 -05:00
Mark Nieweglowski
c6031221e0 panic at map_unit_fn.rs:202 for map() without args 2018-12-22 00:58:07 -05:00
Philipp Hansch
ff634e2350
Change contrib.md hierarchy, link to it from readme
'How Clippy works' and 'How to fix nightly failures' are not exactly part
of 'Writing code'.
2018-12-21 08:11:06 +01:00
HMPerson1
05ae391e2c
Workaround rust-lang/rust#43081 2018-12-20 22:45:44 -05:00
HMPerson1
88564b743e
Teach suspicious_else_formatting about if .. {..} {..} 2018-12-20 22:45:37 -05:00
bors
80c07d4c28 Auto merge of #3564 - alexcrichton:rustc-driver, r=phansch
Link to `rustc_driver` crate in plugin

This is in anticipation for rust-lang/rust#56987 where the
`rustc_driver` crate being linked in will be required to link correctly
against the compiler. In the meantime it should be harmless otherwise!
2018-12-20 05:52:04 +00:00
Alex Crichton
b5f6eb6e75 Link to rustc_driver crate in plugin
This is in anticipation for rust-lang/rust#56987 where the
`rustc_driver` crate being linked in will be required to link correctly
against the compiler. In the meantime it should be harmless otherwise!
2018-12-19 15:05:41 -08:00
bors
f067c5c1ec Auto merge of #3566 - kinnison:kinnison/typofix, r=phansch
mutex_atomic: Correct location of AtomicBool and friends

The AtomicBool, AtomicUsize, and friends, types live in the
`std::sync::atomic` module, rather than `std::atomic` as the lint
help text used to say.
2018-12-19 20:54:48 +00:00
Daniel Silverstone
5875ba3364 mutex_atomic: Correct location of AtomicBool and friends
The AtomicBool, AtomicUsize, and friends, types live in the
`std::sync::atomic` module, rather than `std::atomic` as the lint
help text used to say.
2018-12-19 20:47:50 +00:00
Peter Fürstenau
65c35333a4 Only print out question_mark lint when it actually triggered 2018-12-19 20:55:01 +01:00
Peter Fürstenau
18584698ee Add failing test 2018-12-19 20:50:18 +01:00
Peter Fürstenau
e722b1338e Reinserted commata 2018-12-19 20:31:08 +01:00
bors
691e5e76d3 Auto merge of #3552 - phansch:make_integration_tests_fail_again, r=oli-obk
Make integration tests fail on 'E0463'

cc #3523
2018-12-19 14:33:51 +00:00
bors
980bcd8c53 Auto merge of #3546 - matthiaskrgr:fix_install, r=oli-obk
Revert "Merge pull request #3257 from o01eg/remove-sysroot"

This reverts commit 041c49c1ed, reversing
changes made to 1df5766cbb.

The PR broke running a cargo-install'd clippy.
The installed clippy would not be able to find a crate for std.

Fixes #3523
Reopens #2874
2018-12-19 12:54:47 +00:00
bors
fdb4d983e2 Auto merge of #3563 - mikerite:readme-syspath, r=phansch
Update README local run command to specify syspath
2018-12-19 07:14:20 +00:00
Michael Wright
987f260543 Update README local run command to specify syspath 2018-12-19 06:13:43 +02:00
bors
61de562454 Auto merge of #3554 - klausi:module_name_repeat, r=oli-obk
chore(module_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language

See #3521
2018-12-18 13:28:12 +00:00
Peter Fürstenau
ee0856cbeb Recomend .as_ref()? in certain situations 2018-12-18 13:57:38 +01:00
Peter Fürstenau
8b0ea22885 Deduplicate some code? 2018-12-18 13:57:38 +01:00
bors
176778fe92 Auto merge of #3556 - lucasloisp:bool-ord-comparison, r=oli-obk
Implements lint for order comparisons against bool (#3438)

As described on issue #3438, this change implements linting for `>` and `<` comparisons against both `boolean` literals and between expressions.
2018-12-18 10:11:08 +00:00
bors
a637d55329 Auto merge of #3557 - detrumi:allow_asref_adjustments, r=oli-obk
Fix false positive in useless_asref

Fixes #3480
2018-12-18 08:37:44 +00:00
Wilco Kusee
24ef8db402
Do not mark as_ref as useless if it's followed by a method call 2018-12-17 21:33:50 +01:00
Lucas Lois
de42dfbab7 Changes lint sugg to bitwise and operator & 2018-12-17 15:32:24 -03:00
flip1995
d74288efce
Run update_lints after renaming 2018-12-17 14:33:05 +01:00
flip1995
a44adaa5ed
Rename lint to MODULE_NAME_REPETITIONS 2018-12-17 14:29:19 +01:00
flip1995
60cc6b9319
Add renaming tests 2018-12-17 13:59:09 +01:00
flip1995
0516c2e04a
Move renaming to the right place 2018-12-17 13:58:41 +01:00
bors
091fd0360b Auto merge of #3555 - daxpedda:master, r=oli-obk
Fix `implicit_return` false positives.

Fixing some false positives on the `implicit_return` lint.

Basically it should only check for missing return statements in `block.stmts.last()` if it's a `break`, otherwise it should skip because it would either be an error, or a false positive in the case of a `loop` (which I'm trying to fix with this PR).

**Question:**
- I say "we" inside of comments ([`// make sure it's a break, otherwise we want to skip`](https://github.com/rust-lang/rust-clippy/pull/3555/files#diff-11d233fe8c8414214c2b8732b8c9877aR71)). Any alternatives or is that okay?
- I named a test [`test_loop_with_nests()`](6870638c3f/tests/ui/implicit_return.rs (L54-L64)), any better suggestions?
2018-12-17 10:48:16 +00:00
Lucas Lois
bc48890b47 Implements lint for order comparisons against bool 2018-12-16 21:43:32 -03:00
Klaus Purer
355018d086 fix(module_name_repeat): Try to register renamed lint, not valid yet 2018-12-16 22:49:46 +01:00
daxpedda
6870638c3f
Fix an endless loop in the tests. 2018-12-16 22:20:05 +01:00
daxpedda
35058287ce
Fix implicit_return false positives. 2018-12-16 15:42:02 +01:00
Klaus Purer
15b9e9f23a chore(moduel_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language 2018-12-16 14:10:53 +01:00
Philipp Hansch
abab181984
Make integration tests fail on 'E0463' 2018-12-14 22:09:12 +01:00
Matthias Krüger
9fb8022026 base tests: make sure cargo-clippy binary can be called directly 2018-12-14 21:43:40 +01:00
Matthias Krüger
a9509eb598 Revert "Merge pull request #3257 from o01eg/remove-sysroot"
This reverts commit 041c49c1ed, reversing
changes made to 1df5766cbb.
2018-12-14 21:42:01 +01:00
bors
a416c5e0f7 Auto merge of #3545 - Kampfkarren:vec_boxed_sized, r=flip1995
Adds lint for Vec<Box<T: Sized>>

This adds, and subsequently closes #3530. This is the first time I've ever worked with anything remotely close to internal Rust code, so I'm very much unsure about the if_chain! to figure this out!

I can't get rustfmt working on WSL with nightly 2018-12-07:

`error: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable for download`
2018-12-14 12:10:48 +00:00
bors
6e4d64a01a Auto merge of #3549 - flip1995:rustup, r=oli-obk
rustup rust-lang/rust#52994

`trim_left*` and `trim_right*` are deprecated as of 1.33.0.

`s/trim_left/trim_start/`
`s/trim_right/trim_end/`
2018-12-14 11:40:34 +00:00
flip1995
d866f31678
rustup rust-lang/rust#52994
s/trim_left/trim_start/

s/trim_right/trim_end/
2018-12-14 12:35:44 +01:00
bors
17a9aff71a Auto merge of #3531 - mikerite:fix-3514, r=phansch
Fix write_with_newline escaping false positive

Fixes #3514
2018-12-14 08:42:09 +00:00
Michael Wright
be40d82fea Fix test 2018-12-14 07:24:02 +02:00
Michael Wright
df73348354 Merge branch 'master' into fix-3514 2018-12-14 07:16:26 +02:00
Kampfkarren
985eba08a5 Line length fix 2018-12-13 10:46:21 -08:00
Kampfkarren
db00c3320f Remove references to sized for end users 2018-12-13 10:18:17 -08:00
Kampfkarren
9fc914cf4d Remove DUMMY_SP 2018-12-13 09:37:00 -08:00
Kampfkarren
616395f40b Add suggestion for replacement 2018-12-13 09:34:16 -08:00
Kampfkarren
e5ea5395b9 Update lint definitions 2018-12-13 09:14:01 -08:00