Commit graph

7379 commits

Author SHA1 Message Date
flip1995
aa2381d9d0
Fix rustdoc examples 2019-12-03 16:29:05 +01:00
flip1995
1e3b24de43
Make manual_swap autofixable 2019-12-03 13:42:05 +01:00
flip1995
bd39a608a8
Formatting 2019-12-03 13:25:41 +01:00
flip1995
d1d5f790f5
Fix FP in manual_swap lint with slice-like types 2019-12-03 13:25:41 +01:00
flip1995
d3232b0fce
Add regression test for manual_swap 2019-12-03 13:25:41 +01:00
bors
7a943a9dfc Auto merge of #4875 - flip1995:rustup, r=matthiaskrgr
Rustup to rust-lang/rust#64736

cc rust-lang/rust#64736

Fixes #4872

changelog: none
2019-12-02 20:14:36 +00:00
flip1995
511deceb36
Normalize custom ICE test
Fixes #4872
2019-12-02 20:42:39 +01:00
flip1995
286b39d2e5
Rustup to rust-lang/rust#64736 2019-12-02 20:39:40 +01:00
bors
574f3fdae5 Auto merge of #4873 - phansch:rustup2, r=eddyb
Rustup to https://github.com/rust-lang/rust/pull/66789

changelog: none
2019-12-02 15:14:18 +00:00
Philipp Hansch
474e9a131d
Use assert_crate_local for a more explicit error
`assert_crate_local` does the same as the previous `if let` but with a
more explicit error message if it's not a `ClearCrossCrate::Set`.
2019-12-02 12:09:38 +01:00
Philipp Hansch
6669c2c6ce
Rustup to https://github.com/rust-lang/rust/pull/66789 2019-12-02 09:51:35 +01:00
bors
45196cee02 Auto merge of #4690 - lzutao:fix-test-on-non-amd64, r=flip1995
generate stderr file on 32bit pointer system

changelog: none
2019-12-01 18:39:21 +00:00
bors
5a75502938 Auto merge of #4870 - lzutao:check-macro-missing_inline_in_public_items, r=flip1995
account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint

Closes #4861
changelog: Fix FP (external macro) in [`missing_inline_in_public_items`] lint
2019-12-01 18:21:57 +00:00
Lzu Tao
5488672d1f account for external macro in MISSING_INLINE_IN_PUBLIC_ITEMS lint 2019-12-01 19:38:01 +07:00
Lzu Tao
7156aa7f95 build(tests/fmt): use shared target dir 2019-12-01 19:07:02 +07:00
Lzu Tao
142b289a51 chore: fix and split some ui tests on 32bit system 2019-12-01 19:07:02 +07:00
Lzu Tao
94aa0398c2 build: set up build job for i686 targets 2019-12-01 19:07:02 +07:00
Lzu Tao
83b90d8a86 remove needless my_lint ui test 2019-12-01 09:56:47 +07:00
Lzu Tao
6a66c9fe64 git quiet 2019-12-01 09:56:47 +07:00
bors
e47ae20b5b Auto merge of #4866 - rust-lang:needful-doctest-main, r=flip1995
Less needless_doctest_main false positives

This checks if a) the `fn main() {}` function is empty or if the doctest contains a `static`. In both cases don't lint. While this fixes #4858 at the cost of some false negatives, but this seems a better solution than disabling the lint outright. In the long run, using `syn` should solve the issue in the right way.

changelog: none
2019-12-01 00:13:17 +00:00
bors
b561b6c6e8 Auto merge of #4868 - lzutao:deploy-in-dir, r=phansch
deploy: cd to out/ before adding files to git

It should work now: https://travis-ci.com/lzutao/rust-clippy/jobs/261801929
Closes #4785
changelog: none
2019-11-30 19:15:08 +00:00
Lzu Tao
700f664dcd deploy: cd to out/ before adding files to git 2019-11-30 23:19:13 +07:00
bors
e4d09975d0 Auto merge of #4865 - phansch:fix_master_deployment, r=llogiq
Fix master deployment

It was failing because it could not find `.github/deploy_key.enc` in the
current directory (`./out`). Switching to the previous directory should
fix the deployment and the master build.

Example Travis log: https://travis-ci.com/rust-lang/rust-clippy/jobs/261688169#L1900

changelog: none

cc @lzutao
2019-11-30 12:46:30 +00:00
Andre Bogus
ef7587d957 Less needless_doctest_main false positives
This checks if a) the `fn main() {}` function is empty or if the doctest contains a `static`. In both cases don't lint.
2019-11-29 21:47:26 +01:00
bors
0e66a780ad Auto merge of #4588 - phansch:add_custom_ice_hook, r=Manishearth
Add custom ICE message that points to Clippy repo

changelog: Link to Clippy issue tracker in ICE messages

This utilizes https://github.com/rust-lang/rust/pull/60584 by setting
our own `panic_hook` and pointing to our own issue tracker instead of
the rustc issue tracker.

This also adds a new internal lint to test the ICE message.

**Potential downsides**

* This essentially copies rustc's `report_ice` function as
  `report_clippy_ice`. I think that's how it's meant to be implemented, but
  maybe @jonas-schievink could have a look as well =)

  The downside of more-or-less copying this function is that we have to
  maintain it as well now.
  The original function can be found [here][original].
* `driver` now depends directly on `rustc` and `rustc_errors`

Closes #2734

[original]: 59367b074f/src/librustc_driver/lib.rs (L1185)
2019-11-29 19:48:19 +00:00
Philipp Hansch
c1ccba005f
fmt 2019-11-29 20:47:50 +01:00
Philipp Hansch
44eec0884d
Feed the dog 2019-11-29 20:47:50 +01:00
Philipp Hansch
21dee8f529
Use rustc_env instead of exec_env for test 2019-11-29 20:47:50 +01:00
Philipp Hansch
ad6d8a4700
Make triggering this lint less likely 📎 2019-11-29 20:47:50 +01:00
Philipp Hansch
5029dfe403
Use exec_env to set backtrace level and normalize output 2019-11-29 20:47:50 +01:00
Philipp Hansch
36c6a18217
Update custom ICE function with latest rustc 2019-11-29 20:47:50 +01:00
Philipp Hansch
fc57c84abe
Use Clippy version in ICE message 2019-11-29 20:47:50 +01:00
Philipp Hansch
676f14baa0
Add custom ICE message that points to Clippy repo
This utilizes https://github.com/rust-lang/rust/pull/60584 by setting
our own `panic_hook` and pointing to our own issue tracker instead of
the rustc issue tracker.

This also adds a new internal lint to test the ICE message.

**Potential downsides**

* This essentially copies rustc's `report_ice` function as
  `report_clippy_ice`. I think that's how it's meant to be implemented, but
  maybe @jonas-schievink could have a look as well =)

  The downside of more-or-less copying this function is that we have to
  maintain it as well now.
  The original function can be found [here][original].
* `driver` now depends directly on `rustc` and `rustc_errors`

Closes #2734

[original]: 59367b074f/src/librustc_driver/lib.rs (L1185)
2019-11-29 20:47:47 +01:00
bors
7d4e8e150f Auto merge of #4837 - flip1995:integration, r=phansch
RIIR: Integration tests

In #4825 the `rust-lang/chalk` test failed because the output was too large. I didn't want to completely disabling the output, since showing the backtrace of an ICE directly in travis is pretty useful. Since finding strings in command outputs is easier in Rust, than in bash, I just RIIRed it.

This and also rewriting our tests in Rust may help with trying out new CI platforms (cc #4577)

changelog: none
2019-11-29 19:06:59 +00:00
Philipp Hansch
403b9c6b13
Fix master deployment
It was failing because it could not find `.github/deploy_key.enc` in the
current directory (`./out`). Switching to the previous directory should
fix the deployment and the master build.
2019-11-29 19:51:17 +01:00
bors
059568faeb Auto merge of #4856 - lzutao:rtim-non-installed, r=flip1995
build: check if RTIM is not installed

changelog: none
2019-11-29 18:50:51 +00:00
bors
04036877ef Auto merge of #4863 - phansch:use_self, r=flip1995
Move use_self to nursery

Closes #4859

We have a lot of false positives in this lint, so I think it makes sense
to move this to the nursery until they are resolved.

changelog: Move `use_self` lint to nursery, due to many false positives
2019-11-29 18:17:41 +00:00
bors
350f3d6f5b Auto merge of #4845 - flip1995:clippy_toml_deps, r=phansch
Don't error on clippy.toml of dependencies

Fixes #3874

Checking for `metadata` wasn't enough anymore. `--cap-lints allow` only appears when compiling deps though.

changelog: none
2019-11-29 14:07:57 +00:00
flip1995
fd7eca2baf
Run update_lints 2019-11-29 14:50:19 +01:00
bors
4780ac0f02 Auto merge of #4857 - rust-lang:rustup, r=matthewjasper,oli-obk
Rustup

From https://github.com/rust-lang/rust/pull/66246/

changelog: none
2019-11-29 12:56:14 +00:00
flip1995
604e6ba0e2
Add projections check to EUV for escape analysis 2019-11-29 12:57:10 +01:00
flip1995
b2523afae4
Use infer_ctxt 2019-11-29 11:12:19 +01:00
Philipp Hansch
70a2a29453
Move use_self to nursery
Closes #4859

We have a lot of false positives in this lint, so I think it makes sense
to move this to the nursery until they are resolved.

changelog: Move `use_self` lint to nursery, due to many false positives
2019-11-29 07:51:49 +01:00
Philipp Krones
82066d2f0e
Use println! on success instead of eprintln!
Co-Authored-By: Phil Hansch <dev@phansch.net>
2019-11-28 17:48:29 +01:00
flip1995
a6289ccd4c
Revert "Disable chalk integration test. Output too large"
This reverts commit 553db874d7.
2019-11-28 16:55:21 +01:00
flip1995
6271631ae9
Remove the old integration-tests.sh script 2019-11-28 16:55:21 +01:00
flip1995
21e81f1712
Use rust implementation for integration tests in CI 2019-11-28 16:55:21 +01:00
flip1995
3e1139a7dc
Rust implementation of integration test 2019-11-28 16:55:21 +01:00
flip1995
a61fd43a79
Don't error on clippy.toml of dependencies 2019-11-28 16:42:29 +01:00
Manish Goregaokar
45842e5131 Fix categorizations 2019-11-28 07:33:12 -08:00