]>
git.lizzy.rs Git - rust.git/log
Michael Wright [Sat, 29 Dec 2018 05:59:33 +0000 (07:59 +0200)]
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`
bors [Fri, 28 Dec 2018 20:32:42 +0000 (20:32 +0000)]
Auto merge of #3561 - fuerstenau:master, r=oli-obk
Suggest `.as_ref()?` instead of `?` in certain circumstances.
Peter Fürstenau [Fri, 28 Dec 2018 19:52:46 +0000 (20:52 +0100)]
Fix formatting
Peter Fürstenau [Fri, 28 Dec 2018 19:19:51 +0000 (20:19 +0100)]
Merge remote-tracking branch 'upstream/master'
bors [Fri, 28 Dec 2018 17:11:47 +0000 (17:11 +0000)]
Auto merge of #3587 - flip1995:ui-testing, r=phansch
Use the -Zui-testing flag for compile-test tests
Like `@petrochenkov` suggested in https://github.com/rust-lang/rust-clippy/pull/3581#discussion_r243925691
bors [Fri, 28 Dec 2018 14:07:53 +0000 (14:07 +0000)]
Auto merge of #3591 - flip1995:rustup, r=phansch
Match on ast/hir::ExprKind::Err
rustup rust-lang/rust#56999
flip1995 [Fri, 28 Dec 2018 11:29:34 +0000 (12:29 +0100)]
Match on ast/hir::ExprKind::Err
flip1995 [Thu, 27 Dec 2018 15:57:55 +0000 (16:57 +0100)]
Update *.stderr files
flip1995 [Thu, 27 Dec 2018 15:57:23 +0000 (16:57 +0100)]
Use -Zui-testing flag
bors [Thu, 27 Dec 2018 19:07:21 +0000 (19:07 +0000)]
Auto merge of #3589 - flip1995:contrib_inactive_prs, r=phansch
Mention S-inactive-closed PRs in the CONTRIBUTING.md
Some of these PRs would be great if they could be completed. But I guess no-one would look through closed PRs if they want to contribute. Let's point (new) contributors there by mentioning these PRs in the `CONTRIBUTING.md`
bors [Thu, 27 Dec 2018 18:16:18 +0000 (18:16 +0000)]
Auto merge of #3586 - matthiaskrgr:test_fmt_fix, r=oli-obk
base tests: switch to nightly toolchain before checking formatting of tests with rustfmt
this errored because rustfmt is not available on the master toolchain
flip1995 [Thu, 27 Dec 2018 16:34:17 +0000 (17:34 +0100)]
Mention S-inactive-closed PRs in the CONTRIBUTING.md
Matthias Krüger [Thu, 27 Dec 2018 15:17:45 +0000 (16:17 +0100)]
tests: fix formatting and update test output
fix script one last time™
Matthias Krüger [Thu, 27 Dec 2018 11:40:07 +0000 (12:40 +0100)]
base tests: make sure to fail CI if tests need formatting
Matthias Krüger [Thu, 27 Dec 2018 11:16:08 +0000 (12:16 +0100)]
base tests: switch to nightly toolchain before checking formatting of tests with rustfmt
this errored because rustfmt is not available on the master toolchain
bors [Thu, 27 Dec 2018 15:21:22 +0000 (15:21 +0000)]
Auto merge of #3577 - daxpedda:master, r=flip1995
Fix false positives for `implicit_return` and `empty_loop` on macro expansion.
This PR only fixes `implicit_return` and `empty_loop`.
But I suspect this bug may affect a lot of other lints.
bors [Thu, 27 Dec 2018 12:27:40 +0000 (12:27 +0000)]
Auto merge of #3578 - matthiaskrgr:rustc_tools_util, r=oli-obk
rustc_tools_util: changes in preparation of release on crates.io
I want to release my [cargo-cache](https://github.com/matthiaskrgr/cargo-cache) crate on crates.io however it depends on rustc_tools_util, thus I need to publish rustc_tools_util on crates.io first.
This PR expands the Cargo.toml and adds a readme.
bors [Thu, 27 Dec 2018 10:48:24 +0000 (10:48 +0000)]
Auto merge of #3585 - matthiaskrgr:rustup, r=phansch
rustup https://github.com/rust-lang/rust/pull/57069
Matthias Krüger [Thu, 27 Dec 2018 10:19:20 +0000 (11:19 +0100)]
rustup https://github.com/rust-lang/rust/pull/57069
bors [Wed, 26 Dec 2018 17:35:55 +0000 (17:35 +0000)]
Auto merge of #3579 - matthiaskrgr:tool_lints, r=flip1995
update CARGO_CLIPPY_HELP string to suggest tool lints.
daxpedda [Wed, 26 Dec 2018 17:13:33 +0000 (18:13 +0100)]
Rustfmt.
bors [Wed, 26 Dec 2018 17:11:47 +0000 (17:11 +0000)]
Auto merge of #3580 - matthiaskrgr:trivial_typos, r=flip1995
fix a couple of trivial typos (NFC).
bors [Wed, 26 Dec 2018 14:53:17 +0000 (14:53 +0000)]
Auto merge of #3581 - euclio:camel-case, r=flip1995
fix breakage from rust-lang/rust#57088
Andy Russell [Tue, 25 Dec 2018 21:11:28 +0000 (16:11 -0500)]
fix breakage from rust-lang/rust#57088
Matthias Krüger [Tue, 25 Dec 2018 17:22:34 +0000 (18:22 +0100)]
fix a couple of ftrivial typos (NFC).
Matthias Krüger [Tue, 25 Dec 2018 16:11:57 +0000 (17:11 +0100)]
update CARGO_CLIPPY_HELP string to suggest tool lints.
Matthias Krüger [Tue, 25 Dec 2018 16:03:36 +0000 (17:03 +0100)]
rustc_tools_util: add readme
Matthias Krüger [Tue, 25 Dec 2018 15:44:44 +0000 (16:44 +0100)]
rustc_tool_utils: expand Cargo.toml with a few keywords in preparation for crates.io release
Philipp Krones [Tue, 25 Dec 2018 11:57:16 +0000 (12:57 +0100)]
Fix macro detection in `empty_loop`.
Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
daxpedda [Tue, 25 Dec 2018 11:48:54 +0000 (12:48 +0100)]
Changed `macro_backtrace()` to `in_macro()`.
daxpedda [Mon, 24 Dec 2018 21:06:08 +0000 (22:06 +0100)]
Fix lint detection on macro expansion.
bors [Sun, 23 Dec 2018 12:30:43 +0000 (12:30 +0000)]
Auto merge of #3576 - matthiaskrgr:rustup, r=oli-obk
rustup https://github.com/rust-lang/rust/pull/56992
Oliver Scherer [Sun, 23 Dec 2018 12:29:37 +0000 (13:29 +0100)]
FIXME > TODO
Matthias Krüger [Sun, 23 Dec 2018 09:42:06 +0000 (10:42 +0100)]
rustup https://github.com/rust-lang/rust/pull/56992
bors [Sat, 22 Dec 2018 15:02:50 +0000 (15:02 +0000)]
Auto merge of #3573 - Vlad-Shcherbina:map_clone_caveat, r=flip1995
Document map_clone known problems #498
(cherry picked from commit
ada0d2c54831a904a53ff4106e0ebb6a0f06a687 )
This was lost in relicensing (
057243f16b4f4233 ).
However, I [acknowledged](https://github.com/rust-lang/rust-clippy/issues/3099#issuecomment-
416482309 ) relicensing so this cherry pick should be fine I guess.
bors [Sat, 22 Dec 2018 13:26:22 +0000 (13:26 +0000)]
Auto merge of #3341 - HMPerson1:possibly_missing_else, r=phansch
Teach `suspicious_else_formatting` about `if .. {..} {..}`
We essentially treat bare blocks `{..}` identically to `if .. {..}`, except for different lint messages.
Fixes #3044
Vlad-Shcherbina [Wed, 17 Jan 2018 18:40:47 +0000 (21:40 +0300)]
Document map_clone known problems #498
(cherry picked from commit
ada0d2c54831a904a53ff4106e0ebb6a0f06a687 )
bors [Sat, 22 Dec 2018 10:23:57 +0000 (10:23 +0000)]
Auto merge of #3570 - muth:master, r=phansch
panic at map_unit_fn.rs:202 for map() without args
map_unit_fn.rs accessed map() arguments before type check which ensures type is Option or Result.
Boiled it down to a simple test case.
FWIW: Found this panic when running clippy against code which used a gtk::Window's map() fn inherited from gtk::WidgetExt http://gtk-rs.org/docs/gtk/trait.WidgetExt.html#tymethod.map
bors [Sat, 22 Dec 2018 09:18:39 +0000 (09:18 +0000)]
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'.
Philipp Hansch [Sat, 22 Dec 2018 09:16:52 +0000 (10:16 +0100)]
Remove header link
Mark Nieweglowski [Sat, 22 Dec 2018 06:06:02 +0000 (01:06 -0500)]
test: panic at map_unit_fn.rs:202 for map() without args
Mark Nieweglowski [Sat, 22 Dec 2018 06:04:03 +0000 (01:04 -0500)]
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.
Mark Nieweglowski [Sat, 22 Dec 2018 05:58:07 +0000 (00:58 -0500)]
panic at map_unit_fn.rs:202 for map() without args
Philipp Hansch [Fri, 21 Dec 2018 07:11:06 +0000 (08:11 +0100)]
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'.
HMPerson1 [Fri, 26 Oct 2018 01:16:46 +0000 (21:16 -0400)]
Workaround rust-lang/rust#43081
HMPerson1 [Fri, 19 Oct 2018 22:04:15 +0000 (18:04 -0400)]
Teach `suspicious_else_formatting` about `if .. {..} {..}`
bors [Thu, 20 Dec 2018 05:52:04 +0000 (05:52 +0000)]
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!
Alex Crichton [Wed, 19 Dec 2018 19:41:27 +0000 (11:41 -0800)]
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!
bors [Wed, 19 Dec 2018 20:54:48 +0000 (20:54 +0000)]
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.
Daniel Silverstone [Wed, 19 Dec 2018 20:47:50 +0000 (20:47 +0000)]
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.
Peter Fürstenau [Wed, 19 Dec 2018 19:55:01 +0000 (20:55 +0100)]
Only print out question_mark lint when it actually triggered
Peter Fürstenau [Wed, 19 Dec 2018 19:46:12 +0000 (20:46 +0100)]
Add failing test
Peter Fürstenau [Wed, 19 Dec 2018 19:31:08 +0000 (20:31 +0100)]
Reinserted commata
bors [Wed, 19 Dec 2018 14:33:51 +0000 (14:33 +0000)]
Auto merge of #3552 - phansch:make_integration_tests_fail_again, r=oli-obk
Make integration tests fail on 'E0463'
cc #3523
bors [Wed, 19 Dec 2018 12:54:47 +0000 (12:54 +0000)]
Auto merge of #3546 - matthiaskrgr:fix_install, r=oli-obk
Revert "Merge pull request #3257 from o01eg/remove-sysroot"
This reverts commit
041c49c1ed11b016d6ab9379643bb1da2adf5bfe , reversing
changes made to
1df5766cbb559aab0ad5c2296d8b768182b5186c .
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
bors [Wed, 19 Dec 2018 07:14:20 +0000 (07:14 +0000)]
Auto merge of #3563 - mikerite:readme-syspath, r=phansch
Update README local run command to specify syspath
Michael Wright [Wed, 19 Dec 2018 04:13:43 +0000 (06:13 +0200)]
Update README local run command to specify syspath
bors [Tue, 18 Dec 2018 13:28:12 +0000 (13:28 +0000)]
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
Peter Fürstenau [Tue, 18 Dec 2018 12:55:04 +0000 (13:55 +0100)]
Recomend `.as_ref()?` in certain situations
Peter Fürstenau [Tue, 18 Dec 2018 10:25:13 +0000 (11:25 +0100)]
Deduplicate some code?
bors [Tue, 18 Dec 2018 10:11:08 +0000 (10:11 +0000)]
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.
bors [Tue, 18 Dec 2018 08:37:44 +0000 (08:37 +0000)]
Auto merge of #3557 - detrumi:allow_asref_adjustments, r=oli-obk
Fix false positive in useless_asref
Fixes #3480
Wilco Kusee [Mon, 17 Dec 2018 20:33:50 +0000 (21:33 +0100)]
Do not mark as_ref as useless if it's followed by a method call
Lucas Lois [Mon, 17 Dec 2018 18:32:24 +0000 (15:32 -0300)]
Changes lint sugg to bitwise and operator `&`
flip1995 [Mon, 17 Dec 2018 13:33:05 +0000 (14:33 +0100)]
Run update_lints after renaming
flip1995 [Mon, 17 Dec 2018 13:29:19 +0000 (14:29 +0100)]
Rename lint to MODULE_NAME_REPETITIONS
flip1995 [Mon, 17 Dec 2018 12:59:09 +0000 (13:59 +0100)]
Add renaming tests
flip1995 [Mon, 17 Dec 2018 12:58:41 +0000 (13:58 +0100)]
Move renaming to the right place
bors [Mon, 17 Dec 2018 10:48:16 +0000 (10:48 +0000)]
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()`](https://github.com/rust-lang/rust-clippy/blob/
6870638c3fb66c2abb20633bf40cc09ccc760047 /tests/ui/implicit_return.rs#L54-L64), any better suggestions?
Lucas Lois [Fri, 7 Dec 2018 00:50:16 +0000 (21:50 -0300)]
Implements lint for order comparisons against bool
Klaus Purer [Sun, 16 Dec 2018 21:49:46 +0000 (22:49 +0100)]
fix(module_name_repeat): Try to register renamed lint, not valid yet
daxpedda [Sun, 16 Dec 2018 21:20:05 +0000 (22:20 +0100)]
Fix an endless loop in the tests.
daxpedda [Sun, 16 Dec 2018 14:42:02 +0000 (15:42 +0100)]
Fix `implicit_return` false positives.
Klaus Purer [Sun, 16 Dec 2018 13:10:53 +0000 (14:10 +0100)]
chore(moduel_name_repeat): Rename stutter lint to module_name_repeat to avoid ableist language
Philipp Hansch [Fri, 14 Dec 2018 20:47:02 +0000 (21:47 +0100)]
Make integration tests fail on 'E0463'
Matthias Krüger [Fri, 14 Dec 2018 20:43:40 +0000 (21:43 +0100)]
base tests: make sure cargo-clippy binary can be called directly
Matthias Krüger [Fri, 14 Dec 2018 09:15:56 +0000 (10:15 +0100)]
Revert "Merge pull request #3257 from o01eg/remove-sysroot"
This reverts commit
041c49c1ed11b016d6ab9379643bb1da2adf5bfe , reversing
changes made to
1df5766cbb559aab0ad5c2296d8b768182b5186c .
bors [Fri, 14 Dec 2018 12:10:48 +0000 (12:10 +0000)]
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`
bors [Fri, 14 Dec 2018 11:40:34 +0000 (11:40 +0000)]
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/`
flip1995 [Fri, 14 Dec 2018 11:35:44 +0000 (12:35 +0100)]
rustup rust-lang/rust#52994
s/trim_left/trim_start/
s/trim_right/trim_end/
bors [Fri, 14 Dec 2018 08:42:09 +0000 (08:42 +0000)]
Auto merge of #3531 - mikerite:fix-3514, r=phansch
Fix write_with_newline escaping false positive
Fixes #3514
Michael Wright [Fri, 14 Dec 2018 05:24:02 +0000 (07:24 +0200)]
Fix test
Michael Wright [Fri, 14 Dec 2018 05:16:26 +0000 (07:16 +0200)]
Merge branch 'master' into fix-3514
Kampfkarren [Thu, 13 Dec 2018 18:46:21 +0000 (10:46 -0800)]
Line length fix
Kampfkarren [Thu, 13 Dec 2018 18:15:56 +0000 (10:15 -0800)]
Remove references to sized for end users
Kampfkarren [Thu, 13 Dec 2018 17:37:00 +0000 (09:37 -0800)]
Remove DUMMY_SP
Kampfkarren [Thu, 13 Dec 2018 17:34:16 +0000 (09:34 -0800)]
Add suggestion for replacement
Kampfkarren [Thu, 13 Dec 2018 17:14:01 +0000 (09:14 -0800)]
Update lint definitions
Kampfkarren [Thu, 13 Dec 2018 15:43:13 +0000 (07:43 -0800)]
Lint for Vec<Box<T: Sized>> - Closes #3530
bors [Wed, 12 Dec 2018 19:17:09 +0000 (19:17 +0000)]
Auto merge of #3535 - sinkuu:fixes, r=phansch
Fix some problems
Fixes #2892, #3199, #2841, #3476
bors [Wed, 12 Dec 2018 18:36:38 +0000 (18:36 +0000)]
Auto merge of #3510 - phansch:fix_doc_markdown_mixed_case, r=flip1995
Fix doc_markdown mixed case false positive
Fixes #2343
Philipp Hansch [Fri, 7 Dec 2018 21:38:45 +0000 (22:38 +0100)]
Fix doc_markdown mixed case false positive
bors [Wed, 12 Dec 2018 18:11:13 +0000 (18:11 +0000)]
Auto merge of #3450 - phansch:structured_sugg_for_explicit_write, r=flip1995
Add suggestion for explicit_write lint
Closes #2083
bors [Wed, 12 Dec 2018 17:45:55 +0000 (17:45 +0000)]
Auto merge of #3544 - flip1995:rollup, r=flip1995
Rollup of 3 pull requests
Successful merges:
- #3509 (Fix doc_markdown off by one issue)
- #3539 (Fix rvm/gpg bug in travis osx build)
- #3540 (rustup https://github.com/rust-lang/rust/pull/56092)
Failed merges:
r? @ghost
Philipp Krones [Wed, 12 Dec 2018 17:17:01 +0000 (18:17 +0100)]
Rollup merge of #3540 - matthiaskrgr:rustup, r=flip1995
rustup https://github.com/rust-lang/rust/pull/56092
fix ui test cast_alignment failure by adding #![feature(rustc_private)]
Philipp Krones [Wed, 12 Dec 2018 17:17:00 +0000 (18:17 +0100)]
Rollup merge of #3539 - flip1995:travis_osx_fix, r=oli-obk
Fix rvm/gpg bug in travis osx build
Apparently this workaround isn't needed anymore ([travis](https://travis-ci.org/flip1995/rust-clippy/jobs/
467027571 )) and fixes the latest osx failures: [travis](https://travis-ci.org/rust-lang/rust-clippy/jobs/
467013498 #L152)
Philipp Krones [Wed, 12 Dec 2018 17:16:59 +0000 (18:16 +0100)]
Rollup merge of #3509 - phansch:fix_doc_markdown_bugs, r=flip1995
Fix doc_markdown off by one issue
Fixes #2210
Matthias Krüger [Wed, 12 Dec 2018 16:17:01 +0000 (17:17 +0100)]
rustup https://github.com/rust-lang/rust/pull/56092
fix ui test cast_alignment failure by adding #![feature(rustc_private)]
flip1995 [Wed, 12 Dec 2018 14:37:31 +0000 (15:37 +0100)]
Fix rvm/gpg bug in travis osx build
bors [Wed, 12 Dec 2018 09:56:38 +0000 (09:56 +0000)]
Auto merge of #3537 - matthiaskrgr:fix_script_2, r=matthiaskrgr
base-tests: don't print all commands to stdout during the loop
Fixes thinko in #3529