Commit Graph

7262 Commits

Author SHA1 Message Date
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
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
Manish Goregaokar
c1c5c3522d Fix arguments on ExprUseVisitor::new 2019-11-28 07:20:37 -08:00
Manish Goregaokar
dc9d839410 euv moved from middle to typeck 2019-11-28 07:17:56 -08:00
Manish Goregaokar
85bb66480c cmt_ -> Place 2019-11-28 07:09:02 -08:00
Lzu Tao
d9af448255 build: check if RTIM is not installed 2019-11-28 18:12:01 +07:00
bors
b5a6714155 Auto merge of #4849 - flip1995:deny_warnings, r=phansch
Deny warnings in CI

Removes the `debugging` feature, that wasn't used anymore and adds/enables the `deny-warnings` feature for every sub-crate of Clippy.

changelog: none
2019-11-28 10:27:46 +00:00
bors
dbdd75ab52 Auto merge of #4855 - phansch:rollup-x7yail7, r=phansch
Rollup of 3 pull requests

Successful merges:

 - #4832 (Add some positive examples to lint docs)
 - #4842 ([comparison_chain] #4827 Check `core::cmp::Ord` is implemented)
 - #4847 (fixing a typo)

Failed merges:

changelog: none

r? @ghost
2019-11-28 09:30:16 +00:00
Phil Hansch
a05f3cb9a1
Rollup merge of #4847 - rust-lang:offest, r=phansch
fixing a typo

changelog: none
2019-11-28 10:19:06 +01:00
Phil Hansch
1165176840
Rollup merge of #4842 - timbodeit:comparison-chain-false-positive-4827, r=flip1995
[comparison_chain] #4827 Check `core::cmp::Ord` is implemented

Only emit `comparison_chain` lint, if `cmp` is actually available on the type being compared. Don't emit lint in cases where only `PartialOrd` is implemented.

I haven't yet fully understood [Adjustments](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/adjustment/struct.Adjustment.html). I would appreciate, if someone could double check whether my usage of [expr_ty](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty) in `clippy_lints/src/comparison_chain.rs:91` is correct or if there are cases where using [expr_ty_adjusted](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/ty/struct.TypeckTables.html#method.expr_ty_adjusted) would lead to a different result when used with `utils::implements_trait`.

---

fixes #4827
changelog: [comparison_chain] Check `core::cmp::Ord` is implemented
2019-11-28 10:19:05 +01:00
Phil Hansch
6686892cbf
Rollup merge of #4832 - dario23:i4829, r=phansch
Add some positive examples to lint docs

fixes #4829
changelog: Add some positive examples to lint docs
2019-11-28 10:19:04 +01:00
bors
f3288eb48d Auto merge of #4851 - daxpedda:float-arithmetic, r=flip1995
Remove negative float literal checks.

Fixes #4850.

changelog: Remove negative float literal checks.
2019-11-28 09:11:45 +00:00
bors
d377486561 Auto merge of #4821 - Areredify:as_conversions, r=flip1995
Add `as_conversions` lint

changelog: closes #4771, adding a new pedantic allow-by-default lint that lints against any usage of `as`.
2019-11-28 08:53:36 +00:00
bors
d6accfcc82 Auto merge of #4808 - euclio:string-lit-as-bytes, r=phansch
trigger string_lit_as_bytes when literal has escapes

---

changelog: fix string_lit_as_bytes false negative

Depends on rust-lang/rust#66349.

Fixes #4796.
2019-11-28 07:26:04 +00:00
bors
7f745dabd9 Auto merge of #4848 - lzutao:result-map_or, r=flip1995
make use of Result::map_or

Fixes #1590

changelog: none
2019-11-28 07:07:16 +00:00
Lzu Tao
d0e0ffa99f make use of Result::map_or 2019-11-28 10:52:20 +07:00
bors
7b8e8293d0 Auto merge of #4846 - flip1995:rustup, r=Manishearth
Rustup to rustc 1.41.0-nightly (e87a205c2 2019-11-27)

Rustups:

- rust-lang/rust#66671 (Ast address-of)
- rust-lang/rust#64856 (Scope format! temporaries)
 - http://github.com/rust-lang/rust/pull/66719

changelog: none
2019-11-27 23:10:00 +00:00
Manish Goregaokar
40c91ec758 config.usize_ty -> config.ptr_width
From http://github.com/rust-lang/rust/pull/66719
2019-11-27 15:09:48 -08:00
Manish Goregaokar
73646487af Add blank stderr file for cant_be_const test 2019-11-27 15:09:48 -08:00