Commit Graph

5978 Commits

Author SHA1 Message Date
Philipp Hansch
289a9af801
cargo fmt 2019-04-14 15:07:15 +02:00
bors
b1f05de7c5 Auto merge of #3951 - phansch:add_combine_integration_test, r=phansch
Add Marwes/combine to integration tests

repo link: https://github.com/Marwes/combine

`combine` uses a lot of macros internally, has been downloaded more than 200_000
times and is also a dependency of [`redis-rs`](https://crates.io/crates/redis).

Clippy also previously ICEd on combine in #3747 so I think it would be
good to have this crate as an integration test.
2019-04-14 09:46:47 +00:00
Philipp Hansch
ad27e3ff9b
Refactor suspicious_else_formatting using if_chain 2019-04-14 11:12:51 +02:00
Philipp Hansch
96c34e85c4
Remove except in suspicious_else_formatting
This was causing two different ICEs in #3741.
The first was fixed in #3925.

The second one is fixed with this commit: We just don't `expect`
anymore. If the snippet doesn't contain an `else`, we stop emitting the
lint because it's not a suspiciously formatted else anyway.
2019-04-14 11:04:41 +02:00
bors
d19b66e900 Auto merge of #3959 - rust-lang:rustup, r=phansch
Rust upgrade to rustc 1.35.0-nightly (00856722b 2019-04-13)

r? @phansch @oli-obk
2019-04-14 09:00:33 +00:00
Manish Goregaokar
1366b9516b Rust upgrade to rustc 1.35.0-nightly (00856722b 2019-04-13) 2019-04-13 18:57:16 -07:00
Manish Goregaokar
22b9366e75 Beta changelog 2019-04-13 15:05:25 -07:00
bors
5939b6131f Auto merge of #3950 - phansch:update_changelog, r=Manishearth
Update changelog for Rust 1.34.0

[Rendered](https://github.com/phansch/rust-clippy/blob/update_changelog/CHANGELOG.md#rust-134-2019-04-10)
2019-04-13 17:52:25 +00:00
Philipp Hansch
4e72d1eb8c
Add Marwes/combine to integration tests
repo link: https://github.com/Marwes/combine

`combine` uses a lot of macros internally, has been downloaded more than 200_000
times and is also a dependency of [`redis-rs`](https://crates.io/crates/redis).

Clippy also previously ICEd on combine in #3747 so I think it would be
good to have this crate as an integration test.
2019-04-13 13:21:14 +02:00
Philipp Hansch
745d6fb74b
Mention configuration option for too_many_lines lint 2019-04-13 11:04:58 +02:00
Philipp Hansch
543858d741
Update changelog for Rust 1.34.0 2019-04-13 09:55:48 +02:00
bors
d516925ec8 Auto merge of #3946 - rchaser53:issue-3920, r=flip1995
fix format does not parse escaped braces error

related: https://github.com/rust-lang/rust-clippy/issues/3920
2019-04-12 17:03:01 +00:00
rchaser53
db6ca9b8d3 fix format does not parse escaped braces error 2019-04-13 01:39:10 +09:00
bors
abf7f911d8 Auto merge of #3945 - flip1995:rustup, r=phansch
Rustup

cc https://github.com/rust-lang/rust/pull/59227#issuecomment-482411861

This fix is obsolet once rust-lang/rust#59779 and #3926 is merged.
2019-04-12 11:53:08 +00:00
flip1995
3fe5eea4e4
Fix get_def_path
This fix is obsolet once rust-lang/rust#59779 and #3926 is merged.
2019-04-12 11:59:06 +02:00
bors
6104aefef5 Auto merge of #3938 - phansch:more_uicleanup, r=oli-obk
UI test cleanup: Extract or_fun_call and iter_nth tests

cc #2038
2019-04-11 07:04:44 +00:00
Philipp Hansch
25e2affd31
UI test cleanup: Extract iter_nth tests 2019-04-11 08:23:43 +02:00
Philipp Hansch
fdc2255e81
UI test cleanup: Extract or_fun_call tests 2019-04-11 07:47:04 +02:00
bors
bad3e080bd Auto merge of #3930 - sunjay:patch-1, r=flip1995
Mention that -D warnings will deny ALL warnings, not just clippy warnings

If we pass `-D warnings` to clippy, it causes the build to fail if there are *any* warnings, even the ones not generated by clippy. This isn't immediately obvious when you're looking at this as someone just setting up clippy, so people might not expect this nor know how to fix it. I've added a few sentences in the README to help anyone who runs into this.

These docs are useful for anyone setting up clippy warnings to be denied during CI, but still otherwise want rustc warnings to be allowed.

I could have also changed `-D warnings` to `-D clippy::all` in the Travis configurations themselves, but I wasn't sure what you would prefer to have people use as the default.
2019-04-11 05:09:18 +00:00
Philipp Krones
a7bfac7353 Update README.md
Co-Authored-By: sunjay <sunjay@users.noreply.github.com>
2019-04-10 22:17:17 -04:00
bors
2278814c8e Auto merge of #3931 - phansch:3891, r=flip1995
Fix ICE in decimal_literal_representation lint

Handling the integer parsing properly instead of just unwrapping.

Note that the test is not catching the ICE because plain UI tests
[currently hide ICEs][compiletest_issue]. Once that issue is fixed, this
test would fail properly again.

Fixes #3891

[compiletest_issue]: https://github.com/laumann/compiletest-rs/issues/169
2019-04-10 20:57:15 +00:00
Philipp Hansch
ab6b949224
Refactor check_lit method 2019-04-10 21:05:56 +02:00
bors
3efc3e2455 Auto merge of #3937 - stepnivlk:type_dependent_defs-wrappers, r=oli-obk
Support updated type dependent def ID getter

This PR changes all the calls to `type_dependent_defs` (with panics via `[]`) to new method `type_dependent_def_id` with more explicit `unwrap` panic.

Rust PR: https://github.com/rust-lang/rust/pull/59216
Issue author: @oli-obk
2019-04-10 14:54:54 +00:00
Tomas Koutsky
603996c9d5 Support updated type dependent def ID getter 2019-04-10 16:18:02 +02:00
bors
3d469f436f Auto merge of #3933 - phansch:add_rustfix_eta, r=oli-obk
Add // run-rustfix for eta.rs test

cc #3071, #3630
2019-04-10 09:15:27 +00:00
bors
eb9f9b1f97 Auto merge of #3932 - phansch:2910, r=flip1995
Don't emit useless_attribute lint in external macros

Fixes #2910
2019-04-10 07:29:15 +00:00
Philipp Hansch
9e4e1302a6
Add // run-rustfix for eta.rs test
cc #3071, #3630
2019-04-10 08:16:07 +02:00
Philipp Hansch
1fd2451b90
Code formatting/cleanup 2019-04-10 07:50:34 +02:00
Philipp Hansch
2b0dc39f5b
Don't emit useless_attribute lint in external macros 2019-04-10 07:30:59 +02:00
Philipp Hansch
0eb7596fdc
Exclude ice-3891.rs from rustfmt run
Because the code triggers a rustc parse error which makes rustfmt fail.
2019-04-09 20:53:38 +02:00
bors
37f5c1ec73 Auto merge of #3925 - phansch:3741, r=flip1995
Fix ICE in suspicious_else_formatting

Fixes #3741
2019-04-09 07:13:08 +00:00
Philipp Hansch
0307ff020c
Fix ICE in decimal_literal_representation lint
Handling the integer parsing properly instead of just unwrapping.

Note that the test is not catching the ICE because plain UI tests
[currently hide ICEs][compiletest_issue]. Once that issue is fixed, this
test would fail properly again.

[compiletest_issue]: https://github.com/laumann/compiletest-rs/issues/169
2019-04-08 22:16:34 +02:00
Philipp Hansch
3ab8038450
Remove force-host and explain no-prefer-dynamic 2019-04-08 21:23:39 +02:00
Sunjay Varma
5fab7ec002
Mention that -D warnings will deny ALL warnings, not just clippy warnings 2019-04-08 13:51:54 -04:00
bors
949f58440b Auto merge of #3929 - KarboniteKream:single-char-pattern, r=oli-obk
Escape a single quote in single_char_pattern hint

This PR correctly escapes single quotes in the hint for `single_char_pattern`.
For instance, the hint for `x.split("'")` was `'''`, while it should be `'\''`.
2019-04-08 14:01:20 +00:00
Klemen Košir
560fd163d6
Escape a single quote in single_char_pattern hint 2019-04-08 21:55:50 +09:00
bors
4fdd113bed Auto merge of #3921 - euclio:single-char-names-multispan, r=flip1995
use a multispan for MANY_SINGLE_CHAR_NAMES
2019-04-08 08:42:13 +00:00
bors
e91ba8af85 Auto merge of #3848 - felix91gr:null_transmute, r=flip1995
Transmuting known null ptr to ref

Working on implementing #628
2019-04-08 07:20:25 +00:00
bors
42e1cf3763 Auto merge of #3901 - rail-rain:issue_1670, r=flip1995
Fix `explicit_counter_loop` suggestion

#1670

This code seems to me to work, but I have two question.
* Because range expression desugared in hir, `Sugg::hir` doesn't add parenthesis to range expression.  Which function is better to check range do you think, `check_for_loop_explicit_counter` or `hir_from_snippet`?
* Do you think we need to distinguish between range expression and struct expression that creates `std::ops::Range*`?
2019-04-08 06:28:15 +00:00
bors
e226f17d52 Auto merge of #3885 - mikerite:clippy_dev_toolchain, r=phansch
Add rust-toolchain for clippy_dev

AFAIK, `clippy_dev` is supposed to be built on stable. (This is why it's not a `[bin]` inside the root `Cargo.toml`.) This adds a `rust-toolchain` file for easy switching.
2019-04-08 05:58:34 +00:00
Philipp Hansch
547c5c0667
cargo fmt 2019-04-08 07:56:54 +02:00
bors
0849f73595 Auto merge of #3928 - rust-lang:tmpadd, r=Manishearth
Re-add tmp feature to compiletest

Got accidentally removed in the rustup
2019-04-07 21:36:51 +00:00
Manish Goregaokar
c7b78234da Re-add tmp feature to compiletest
Got accidentally removed in the rustup
2019-04-07 14:36:03 -07:00
bors
cffb416d89 Auto merge of #3927 - rust-lang:rustup, r=Manishearth
Revert compiletest hacks, use latest compiletest

The libtest changes have been reverted, see https://github.com/rust-lang/rust/pull/59766,  https://github.com/laumann/compiletest-rs/pull/174
2019-04-07 20:41:39 +00:00
Manish Goregaokar
4c7c39acbc Remove libtest from deps 2019-04-07 12:39:43 -07:00
Manish Goregaokar
ee69237274 Re-allow clippy::identity_conversion in compiletest 2019-04-07 12:07:20 -07:00
Manish Goregaokar
a8ce9d655a Use latest compiletest-rs 2019-04-07 12:02:22 -07:00
Manish Goregaokar
ba8712c5fd Revert tests/compile-test.rs to 61aa5c957c 2019-04-07 12:01:39 -07:00
Philipp Hansch
60c1bb0546
Fix ICE in suspicious_else_formatting 2019-04-07 11:11:06 +02:00
Matthias Krüger
0e455b0466
Merge pull request #3918 from matthiaskrgr/typos
NFC: fix typos
2019-04-07 10:29:51 +02:00