Commit graph

5209 commits

Author SHA1 Message Date
Philipp Hansch
d93ea1ec99
s/rustfmt-preview/rustfmt/ 2018-12-08 12:41:04 +01:00
Philipp Hansch
fe3519e0dd
Swap if branches 2018-12-08 12:09:32 +01:00
Philipp Hansch
d90cad24a1
Fix c_void false positive caused by libc refactoring
The path of `libc::c_void` has changes in 5c1a6b8a6d
The DefId path is now always platform specific like
`libc::windows::c_void`. This fixes our c_void detection to only check
the first and last elements.
2018-12-08 12:05:11 +01:00
Matthias Krüger
f13d23de41
rustup https://github.com/rust-lang/rust/pull/56502 ( .hir -> .hir() ) 2018-12-08 12:05:09 +01:00
Philipp Hansch
26602ddff4
Merge pull request #3336 from HMPerson1/clone_on_copy_deref
Fix `clone_on_copy` not detecting derefs sometimes
2018-12-08 09:59:02 +01:00
Philipp Hansch
a73d051227
Remove allow(doc_markdown) in excessive_precision.rs 2018-12-07 22:47:12 +01:00
Philipp Hansch
4884c2fc2e
Merge pull request #3507 from flying-sheep/patch-1
typo: emum → enum
2018-12-07 22:20:19 +01:00
Philipp A
2fed8d9f1d
typo: emum → enum 2018-12-07 12:24:59 +01:00
Philipp Hansch
041c49c1ed
Merge pull request #3257 from o01eg/remove-sysroot
Don't try to determine sysroot. rustc_driver will use default value.
2018-12-06 22:11:29 +01:00
Philipp Hansch
1df5766cbb
Merge pull request #3501 from matthiaskrgr/rustup
rustup clippy build with latest rustc
2018-12-06 17:17:40 +01:00
Manish Goregaokar
519a6cde81
Merge pull request #3502 from rust-lang/nrc-patch-1
Remove -preview suffix from README
2018-12-06 11:17:18 -05:00
Nick Cameron
7220185560
Remove -preview suffix from README 2018-12-06 11:11:50 -05:00
Matthias Krüger
45cbdf471d rustup clippy build with latest rustc
(breakage due to 08f8faedd0 )

Fixes #3500
2018-12-06 16:44:22 +01:00
Philipp Hansch
c4ef06a9b6
Merge pull request #3497 from daxpedda/master
Fix bug in `implicit_return`.
2018-12-06 14:13:20 +01:00
daxpedda
a4ec7be06f
Forgot to remove some debugging code ... 2018-12-06 13:23:42 +01:00
daxpedda
d048e15835
Improved code noted by clippy. 2018-12-06 13:21:04 +01:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
0fb30218d5
Merge pull request #3496 from fkohlgrueber/macro-in-closure-in-if-cond
fix #3482 and add ui test for it
2018-12-06 12:26:43 +01:00
daxpedda
973d676cd1
Fix bug in implicit_return.
Bug was already covered by test, but test was not checked for.
2018-12-06 12:22:54 +01:00
O01eg
278b94e6db
Fix format. 2018-12-06 13:46:23 +03:00
O01eg
5113de90d1
Add sysroot gettinh code to dogfood tests. 2018-12-06 13:21:45 +03:00
Felix Kohlgrüber
a8a0b236b5 fix #3482 and add ui test for it 2018-12-06 11:07:10 +01:00
O01eg
571d4cc7bf
Add sysroot getting code to tests. 2018-12-06 12:23:47 +03:00
O01eg
69813d6faf
Don't try to determine sysroot. rustc_driver will use default value. 2018-12-06 12:23:39 +03:00
Philipp Hansch
f93591294d
Merge pull request #3494 from daxpedda/master
Added `IMPLICIT_RETURN` lint.
2018-12-06 07:12:01 +01:00
Philipp Hansch
7cb1b1f7e1
Merge pull request #3444 from waynr/fix-dogfood-tests
Fix dogfood tests
2018-12-06 07:10:04 +01:00
Wayne Warren
0442bb9ce0 Don't change current working directory of cargo tests 2018-12-05 18:18:17 -06:00
Wayne Warren
87d517df5d Use cargo's "PROFILE" envvar and set CLIPPY_DOGFOOD 2018-12-05 18:18:17 -06:00
Wayne Warren
66251c3ece Use dogfood_runner for deterministic test ordering 2018-12-05 18:18:17 -06:00
Wayne Warren
1db535a887 Remove unnecessary documentation 2018-12-05 18:18:17 -06:00
Wayne Warren
72247d8e2e Fix dogfood tests. 2018-12-05 18:18:17 -06:00
daxpedda
b0f3ed2b80 Added additional reasoning to Why is this bad?.
Added comment to explain usage of MIR.
2018-12-05 15:01:19 +01:00
daxpedda
aed2b986e6 Renamed to implicit_return.
Covered all other kinds besides `ExprKind::Lit`.
Added check for replacing `break` with `return`.
2018-12-05 14:39:09 +01:00
Philipp Krones
29bf75cd31
Merge pull request #3495 from flip1995/tykind_fix
Fix usage of ty::TyKind
2018-12-05 13:34:20 +01:00
flip1995
36ee92780d
Fix ty::TyKind usage 2018-12-05 12:47:19 +01:00
flip1995
20a07f6d80
Fix TyKind::<kind> usage in codebase 2018-12-05 12:47:10 +01:00
daxpedda
19db2f1a32 Appeasing the Test Gods.
Seems I'm not smart enough to run the tests locally before committing.
2018-12-05 11:26:40 +01:00
daxpedda
978f8c65ee Renamed forced_return to missing_returns.
Better clarification in the docs.
Ran `update_lints`.
2018-12-05 10:54:21 +01:00
daxpedda
d5d6692288 Added FORCED_RETURN lint. 2018-12-05 01:59:09 +01:00
Philipp Krones
3f24cdf10f
Merge pull request #3490 from phansch/extract_single_match_else_ui_test
Extract single_match_else UI test
2018-12-04 14:57:19 +01:00
Philipp Hansch
68bb900eba
Merge pull request #3473 from lucasloisp/additional-bool-comparisons
Adds inequality cases to bool comparison (#3438)
2018-12-04 07:26:29 +01:00
Philipp Hansch
8b2eb06df3
Merge pull request #3488 from phansch/fix_cargo_lint_bug
Fix wildcard_dependencies false positive
2018-12-04 07:24:11 +01:00
Philipp Hansch
3f72d4d630
Extract single_match_else UI test
There's only one test currently.
I also updated the lint doc with a 'good' example and changed the lint
help text a bit.

cc #2038
2018-12-04 07:20:13 +01:00
Philipp Hansch
46ee676139
cargo fmt 2018-12-04 06:47:41 +01:00
Lucas Lois
3930148059 Adds inequality cases to bool comparison lint
The lint now checks cases like `y != true`
2018-12-03 16:32:11 -03:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
c00210d7ba
Merge pull request #3478 from dtolnay/setlen
Remove unsafe_vector_initialization lint
2018-12-03 12:42:31 +01:00
David Tolnay
e632a1946e
Remove unsafe_vector_initialization lint 2018-12-03 02:48:37 -08:00
Oliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer
13438b6866
Merge pull request #3479 from dtolnay/literal
Downgrade large_digit_groups to pedantic
2018-12-03 11:06:56 +01:00
Philipp Hansch
ef64c762d2
Fix wildcard_dependencies false positive
This now only checks for wildcard_dependencies if the source is a
non-git source.

I tried adding a compiletest suite for the cargo lints, but I was unable
to override the `Cargo.toml` of the original executable.

I tested this manually by modifying the main `Cargo.toml`.

Fixes #3458
2018-12-03 08:12:35 +01:00
Philipp Hansch
a6f4cf7740
Merge pull request #3487 from phansch/fix_fmt
Fix rustfmt format
2018-12-03 07:44:43 +01:00
Philipp Hansch
ebd508e0ac
Fix rustfmt format 2018-12-03 07:13:00 +01:00