]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoAuto merge of #5165 - matthiaskrgr:ci_cargo_cache_autoclean, r=flip1995
bors [Wed, 12 Feb 2020 15:11:32 +0000 (15:11 +0000)]
Auto merge of #5165 - matthiaskrgr:ci_cargo_cache_autoclean, r=flip1995

gha: install cargo-cache with ci-autoclean feature which speeds up build time by a large margin.

changelog: none

4 years agogha: install cargo-cache with ci-autoclean feature which speeds up build time by...
Matthias Krüger [Wed, 12 Feb 2020 13:02:38 +0000 (14:02 +0100)]
gha: install cargo-cache with ci-autoclean feature which speeds up build time by a large margin.

4 years agoAuto merge of #5164 - flip1995:gha_deploy_fix, r=flip1995
bors [Wed, 12 Feb 2020 14:08:20 +0000 (14:08 +0000)]
Auto merge of #5164 - flip1995:gha_deploy_fix, r=flip1995

Fix tag deployment on GHA

I just want to test some things here currently.

changelog: none

4 years agoRun deploy workflow on tags, instead of releases
flip1995 [Wed, 12 Feb 2020 13:49:08 +0000 (14:49 +0100)]
Run deploy workflow on tags, instead of releases

4 years agoAuto merge of #5162 - flip1995:gha_fix, r=flip1995
bors [Wed, 12 Feb 2020 10:24:27 +0000 (10:24 +0000)]
Auto merge of #5162 - flip1995:gha_fix, r=flip1995

Fix GHA after the merge

changelog: none

4 years agoUse list instead of array for branch names
flip1995 [Wed, 12 Feb 2020 10:02:07 +0000 (11:02 +0100)]
Use list instead of array for branch names

This is the officially supported method

4 years agoAuto merge of #5088 - rust-lang:gha, r=Manishearth,flip1995
bors [Wed, 12 Feb 2020 09:02:18 +0000 (09:02 +0000)]
Auto merge of #5088 - rust-lang:gha, r=Manishearth,flip1995

Switch to GitHub Actions - Part 2 - From within

This is a continuation of #5071. This time from a branch inside the rust-lang/rust-clippy repo, not from my fork, since secrets are not available in PRs from forks.

Copying the description of #5071 to here:

Closes #4577

~~This is just an experiment. I don't think we have a consensus _if_ we should move away from travis/appveyor.~~ We have consensus: https://github.com/rust-lang/rust-clippy/pull/5071#issuecomment-576647638

~~GHA would let us run up to 20 concurrent jobs. Since we have 15 integration tests and 4 (linux, linux 32-bit, macos, windows) basic tests, we would be able to run everything concurrently.~~ The org has a limit of 60 jobs across the org, so we limit the matrix of the integration tests to 6 concurrent jobs.

~~Also IIUC we only have to build Clippy once for every initegration test and then only check the repos.~~ Nope, dependent jobs exist, but they won't keep the artifacts (not even the checkout).

TODO before merge:

- [x] Add `DEPLOY_KEY` secret to github repo
- [x] test deployment on test branch `gh-test`#
  - [x] Test normal deployment
  - [x] Test deployment no changes
  - [x] Test deployment of tag
- [x] talk with `@rust-lang/infra` for bors, `@rust-lang/infra` is good with the move (crater also uses GHA+bors)
- [x] ~~Get remark + clippy_dev check to work on pushes (https://github.community/t5/GitHub-Actions/~Builds-are-not-triggered-with-on-paths/m-p/44075; I contacted GH support about this) ~~That seems to start working again yesterday. Let's hope it keeps working.~~ Or not: df9be48. Now it works again: 723786a. I think we should wait, until this is reliable. It appears, that it doesn't work on force pushes (sometimes?): 5814142~~ We need to run the bors tests unconditionally anyway (47138d1) so it doesn't really matter.
- [x] ~~impl homu checks for GHA https://github.com/rust-lang/rust-clippy/pull/5071#issuecomment-576642983 -- I prepared: https://github.com/flip1995/rust-central-station/commit/f40230dc3cebfe4120c9dce027f61c18dd8935cb. I'd suggest to first add GHA and keep the travis and appveyor checks for a few days and to remove them in a second pass. The bors dummy jobs are added in https://github.com/rust-lang/rust-clippy/pull/5088/commits/1a83b7ad7a45aa8db4db7da55a45931e725a1ca3 and work as expected: https://github.com/rust-lang/rust-clippy/pull/5088#issuecomment-582055695. I opened https://github.com/rust-lang/rust-central-station/pull/578~~ See https://github.com/rust-lang/rust-clippy/pull/5088#issuecomment-584581420
- [x] ~Add GHA badge to Cargo.toml (blocked on rust-lang/crates.io # 1838)~ Added a FIXME in
2332b57
- [x] ~Maybe we should also wait until GHA supports yaml anchors. https://github.community/t5/GitHub-Actions/Support-for-YAML-anchors/td-p/30336/~ WIll probably not be implemented in the near future.
- [x] Add back travis + appveyor files for transition period (!)

changelog: none

4 years agoDon't upload target/release in integration_build
flip1995 [Wed, 12 Feb 2020 09:01:19 +0000 (10:01 +0100)]
Don't upload target/release in integration_build

This dir was generated by compiling RTIM, when no cache is available

4 years agoUse nightly cargo to install cargo-cache
flip1995 [Sun, 9 Feb 2020 15:29:03 +0000 (16:29 +0100)]
Use nightly cargo to install cargo-cache

Stable cargo install still errors when packages exists, instead of updating it

4 years agoInstall all required remark packages in travis
flip1995 [Fri, 7 Feb 2020 21:33:05 +0000 (22:33 +0100)]
Install all required remark packages in travis

4 years agoRemove deployment from travis
flip1995 [Fri, 7 Feb 2020 21:27:14 +0000 (22:27 +0100)]
Remove deployment from travis

4 years agoApply review comments
flip1995 [Fri, 7 Feb 2020 21:24:41 +0000 (22:24 +0100)]
Apply review comments

4 years agoRun bors checks unconditionally
flip1995 [Tue, 4 Feb 2020 17:42:45 +0000 (18:42 +0100)]
Run bors checks unconditionally

This is important, since bors doesn't know optional jobs. Otherwise bors
would time out, when a check doesn't get run.

4 years agoAdd bors dummy jobs
flip1995 [Tue, 4 Feb 2020 16:33:50 +0000 (17:33 +0100)]
Add bors dummy jobs

4 years agoUse hash of Cargo.lock file in cache name
flip1995 [Fri, 31 Jan 2020 13:44:55 +0000 (14:44 +0100)]
Use hash of Cargo.lock file in cache name

4 years agoAdd two more error causes to integration test
flip1995 [Fri, 31 Jan 2020 13:43:02 +0000 (14:43 +0100)]
Add two more error causes to integration test

4 years agoBuild Clippy before running integration tests
flip1995 [Fri, 31 Jan 2020 13:42:44 +0000 (14:42 +0100)]
Build Clippy before running integration tests

4 years agoAllow non-ascii characters in changelog check
flip1995 [Thu, 30 Jan 2020 16:03:45 +0000 (17:03 +0100)]
Allow non-ascii characters in changelog check

4 years agoExtract deployment
flip1995 [Sun, 26 Jan 2020 14:40:53 +0000 (15:40 +0100)]
Extract deployment

4 years agoExtract driver test
flip1995 [Sun, 26 Jan 2020 14:13:14 +0000 (15:13 +0100)]
Extract driver test

4 years agoSort output of export.py script
flip1995 [Fri, 24 Jan 2020 13:34:25 +0000 (14:34 +0100)]
Sort output of export.py script

4 years agoLimit parallel jobs on try/r+ runs
flip1995 [Thu, 23 Jan 2020 14:47:11 +0000 (15:47 +0100)]
Limit parallel jobs on try/r+ runs

Rate limit of 60 applies org wide, let's not spam.
Thanks pietroalbini for the hint

4 years agoCancle builds on new commits
flip1995 [Thu, 23 Jan 2020 13:40:37 +0000 (14:40 +0100)]
Cancle builds on new commits

4 years agoAdd GHA badge to README.md
flip1995 [Thu, 23 Jan 2020 09:22:02 +0000 (10:22 +0100)]
Add GHA badge to README.md

Add a FIXME to Cargo.toml

4 years agoSmall change to comment in .gitignore
flip1995 [Thu, 23 Jan 2020 09:36:51 +0000 (10:36 +0100)]
Small change to comment in .gitignore

4 years agoAdd deployment to GHA
flip1995 [Wed, 22 Jan 2020 20:00:31 +0000 (21:00 +0100)]
Add deployment to GHA

4 years agoMove integration tests in clippy_bors.yml
flip1995 [Wed, 22 Jan 2020 19:00:41 +0000 (20:00 +0100)]
Move integration tests in clippy_bors.yml

Some call it the integration integration

4 years agoAdd Clippy Test to GHA
flip1995 [Wed, 22 Jan 2020 16:06:13 +0000 (17:06 +0100)]
Add Clippy Test to GHA

4 years agoGet {RUSTUP,MULTIRUST}_{HOME,TOOLCHAIN} from runtime environment
flip1995 [Wed, 22 Jan 2020 13:56:08 +0000 (14:56 +0100)]
Get {RUSTUP,MULTIRUST}_{HOME,TOOLCHAIN} from runtime environment

Keep the fallback to compile-time environment

4 years agoCheck if changelog exists
flip1995 [Tue, 21 Jan 2020 20:40:40 +0000 (21:40 +0100)]
Check if changelog exists

4 years agoIgnore fmt test in GHA CI
flip1995 [Tue, 21 Jan 2020 17:44:30 +0000 (18:44 +0100)]
Ignore fmt test in GHA CI

This is already checked by clippy_dev.yml GHA

4 years agoAdd Clippy Test (bors) to GHA
flip1995 [Tue, 21 Jan 2020 17:43:57 +0000 (18:43 +0100)]
Add Clippy Test (bors) to GHA

4 years agoFix markdown Files
flip1995 [Tue, 21 Jan 2020 15:39:58 +0000 (16:39 +0100)]
Fix markdown Files

Rendered:

[CHANGELOG.md](https://github.com/flip1995/rust-clippy/blob/gha/CHANGELOG.md)
[CODE_OF_CONDUCT.md](https://github.com/flip1995/rust-clippy/blob/gha/CODE_OF_CONDUCT.md)
[CONTRIBUTING.md](https://github.com/flip1995/rust-clippy/blob/gha/CONTRIBUTING.md)
[README.md](https://github.com/flip1995/rust-clippy/blob/gha/README.md)
[clippy_dummy/PUBLISH.md](https://github.com/flip1995/rust-clippy/blob/gha/clippy_dummy/PUBLISH.md)
[doc/adding_lints.md](https://github.com/flip1995/rust-clippy/blob/gha/doc/adding_lints.md)
[etc/relicense/RELICENSE_DOCUMENTATION.md](https://github.com/flip1995/rust-clippy/blob/gha/etc/relicense/RELICENSE_DOCUMENTATION.md)

4 years agoRename .remarkrc.json -> .remarkrc and fix file
flip1995 [Tue, 21 Jan 2020 15:32:25 +0000 (16:32 +0100)]
Rename .remarkrc.json -> .remarkrc and fix file

4 years agoAdd remark check to GHA
flip1995 [Tue, 21 Jan 2020 14:29:54 +0000 (15:29 +0100)]
Add remark check to GHA

4 years agoAdd clippy_dev checks to GitHub Actions
flip1995 [Tue, 21 Jan 2020 12:46:53 +0000 (13:46 +0100)]
Add clippy_dev checks to GitHub Actions

4 years agoAdd integration test GitHub action
flip1995 [Mon, 20 Jan 2020 15:03:26 +0000 (16:03 +0100)]
Add integration test GitHub action

4 years agoAuto merge of #5158 - lzutao:callbackshook, r=flip1995
bors [Tue, 11 Feb 2020 22:22:05 +0000 (22:22 +0000)]
Auto merge of #5158 - lzutao:callbackshook, r=flip1995

Impl DefaultCallbacks on our side

cc https://github.com/rust-lang/rust/pull/69059#discussion_r377643560

changelog: none

4 years agoAuto merge of #5152 - flip1995:rustup, r=flip1995
bors [Tue, 11 Feb 2020 20:54:49 +0000 (20:54 +0000)]
Auto merge of #5152 - flip1995:rustup, r=flip1995

Rustup to rust-lang/rust#68725

Preparation for rust-lang/rust#68725

changelog: none

4 years agoImpl DefaultCallbacks on our side
Lzu Tao [Tue, 11 Feb 2020 15:52:00 +0000 (22:52 +0700)]
Impl DefaultCallbacks on our side

4 years agoAuto merge of #5155 - krishna-veerareddy:remove-unused-imports, r=flip1995
bors [Tue, 11 Feb 2020 14:25:21 +0000 (14:25 +0000)]
Auto merge of #5155 - krishna-veerareddy:remove-unused-imports, r=flip1995

Remove unnecessary `Lint{Array|Pass}` imports

changelog: none

4 years agoRemove unnecessary imports from tests
Krishna Sai Veera Reddy [Tue, 11 Feb 2020 14:20:47 +0000 (06:20 -0800)]
Remove unnecessary imports from tests

4 years agoRemove unnecessary imports from documentation
Krishna Sai Veera Reddy [Tue, 11 Feb 2020 03:37:25 +0000 (19:37 -0800)]
Remove unnecessary imports from documentation

4 years agoRemove unnecessary imports from `new_lint` tool
Krishna Sai Veera Reddy [Tue, 11 Feb 2020 03:24:01 +0000 (19:24 -0800)]
Remove unnecessary imports from `new_lint` tool

4 years agoAuto merge of #5151 - flip1995:fix_run_pass_tests, r=flip1995
bors [Mon, 10 Feb 2020 16:02:30 +0000 (16:02 +0000)]
Auto merge of #5151 - flip1995:fix_run_pass_tests, r=flip1995

Fix run-pass tests when CARGO_TARGET_DIR is not set

r? @lzutao

I got

```
thread '[ui] ui/crashes/ice-1969.rs' panicked at 'failed to exec `"target/debug/test_build_base/crashes/ice-1969.stage-id"`: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/pkrones/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.4.0/src/runtest.rs:1350:25
```

on tests with `// run-pass` locally. The reason for this is, that I haven't set `CARGO_TARGET_DIR` and then `"target"` was used as the `CARGO_TARGET_DIR`. It seems, that `compiletest-rs` cannot deal with relative paths for `// run-pass` tests.

changelog: none

4 years agoUse current_dir instead of cargo_metadata
Philipp Krones [Mon, 10 Feb 2020 15:42:50 +0000 (16:42 +0100)]
Use current_dir instead of cargo_metadata

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoRustup to rust-lang/rust#68725
flip1995 [Mon, 10 Feb 2020 14:59:14 +0000 (15:59 +0100)]
Rustup to rust-lang/rust#68725

4 years agoFix run-pass tests when CARGO_TARGET_DIR is not set
flip1995 [Mon, 10 Feb 2020 14:51:51 +0000 (15:51 +0100)]
Fix run-pass tests when CARGO_TARGET_DIR is not set

4 years agoAuto merge of #5148 - krishna-veerareddy:issue-5147-option-env-unwrap, r=flip1995
bors [Mon, 10 Feb 2020 08:08:53 +0000 (08:08 +0000)]
Auto merge of #5148 - krishna-veerareddy:issue-5147-option-env-unwrap, r=flip1995

Add `option-env-unwrap` lint

changelog: Add `option-env-unwrap` lint

Fixes #5147

4 years agoUse `PATH` environment variable for testing
Krishna Sai Veera Reddy [Sun, 9 Feb 2020 22:12:40 +0000 (14:12 -0800)]
Use `PATH` environment variable for testing

The tests were failing on windows because the `HOME` env variable
doesn't exist on it so using the `PATH` variable to test instead.

4 years agoAuto merge of #5150 - krishna-veerareddy:rustup-69004, r=flip1995
bors [Sun, 9 Feb 2020 22:59:08 +0000 (22:59 +0000)]
Auto merge of #5150 - krishna-veerareddy:rustup-69004, r=flip1995

Rustup to rust-lang/rust#68911

changelog: none

4 years agoRustup to rust-lang/rust#68911
Krishna Sai Veera Reddy [Sun, 9 Feb 2020 22:44:17 +0000 (14:44 -0800)]
Rustup to rust-lang/rust#68911

4 years agoAllow `option-env-unwrap` within external macros
Krishna Sai Veera Reddy [Sun, 9 Feb 2020 18:58:08 +0000 (10:58 -0800)]
Allow `option-env-unwrap` within external macros

4 years agoAccount for `expect` being used to unwrap `Option`
Krishna Sai Veera Reddy [Sun, 9 Feb 2020 16:54:23 +0000 (08:54 -0800)]
Account for `expect` being used to unwrap `Option`

4 years agoAuto merge of #5145 - lzutao:rmeta, r=flip1995
bors [Sun, 9 Feb 2020 12:44:23 +0000 (12:44 +0000)]
Auto merge of #5145 - lzutao:rmeta, r=flip1995

Fix error E0460 when compiled on Rustc repo

Sadly, this mostly reverts  #5121. Now I use HashMap to only store one rlib
per crate. But that would not work when non-compatible version of the same crate show up.

changelog: none

4 years agoFix error E0460 when compiled on Rustc repo
Lzu Tao [Sun, 9 Feb 2020 05:00:49 +0000 (12:00 +0700)]
Fix error E0460 when compiled on Rustc repo

4 years agoAuto merge of #5149 - lzutao:rustup-65232, r=flip1995
bors [Sun, 9 Feb 2020 11:08:43 +0000 (11:08 +0000)]
Auto merge of #5149 - lzutao:rustup-65232, r=flip1995

Rustup "index ReEmpty by universe"

cc https://github.com/rust-lang/rust/pull/65232

changelog: none

4 years agoRustup "index ReEmpty by universe"
Lzu Tao [Sun, 9 Feb 2020 08:31:47 +0000 (15:31 +0700)]
Rustup "index ReEmpty by universe"

4 years agoAdd `option-env-unwrap` lint
Krishna Sai Veera Reddy [Sun, 9 Feb 2020 00:44:35 +0000 (16:44 -0800)]
Add `option-env-unwrap` lint

4 years agoAuto merge of #5140 - lzutao:cleanup-replace, r=flip1995
bors [Fri, 7 Feb 2020 22:41:04 +0000 (22:41 +0000)]
Auto merge of #5140 - lzutao:cleanup-replace, r=flip1995

Minor edit to text region replacement

changelog: none

4 years agoAuto merge of #5146 - lzutao:rustup, r=flip1995
bors [Fri, 7 Feb 2020 08:28:41 +0000 (08:28 +0000)]
Auto merge of #5146 - lzutao:rustup, r=flip1995

Rustup https://github.com/rust-lang/rust/pull/67359

cc https://github.com/rust-lang/rust/pull/67359

changelog: none

4 years agoUpdate CARGO_TARGET_DIR
Lzu Tao [Fri, 7 Feb 2020 03:34:11 +0000 (10:34 +0700)]
Update CARGO_TARGET_DIR

4 years agoRustup https://github.com/rust-lang/rust/pull/67359
Lzu Tao [Fri, 7 Feb 2020 03:34:06 +0000 (04:34 +0100)]
Rustup https://github.com/rust-lang/rust/pull/67359

4 years agodev: Move DOCS_LINK out of lazy_static and reuse it
Lzu Tao [Fri, 7 Feb 2020 01:33:01 +0000 (08:33 +0700)]
dev: Move DOCS_LINK out of lazy_static and reuse it

4 years agodev: Make UpdateMode a copy type
Lzu Tao [Thu, 6 Feb 2020 14:28:50 +0000 (21:28 +0700)]
dev: Make UpdateMode a copy type

4 years agodev: Prefer `fs::read*` and improvement to replace text region
Lzu Tao [Thu, 6 Feb 2020 14:13:39 +0000 (21:13 +0700)]
dev: Prefer `fs::read*` and improvement to replace text region

4 years agoAuto merge of #5134 - flip1995:snippet_block, r=phansch
bors [Thu, 6 Feb 2020 21:41:50 +0000 (21:41 +0000)]
Auto merge of #5134 - flip1995:snippet_block, r=phansch

Make it possible to correctly indent snippet_block snippets

This adds a `indent_relative_to` arg to the `{snippet,expr}_block` functions. This makes it possible to keep the correct indentation of block like suggestions.

In addition, this makes the `trim_multiline` function private and adds a `indent_of` function, to get the indentation of the first line of a span.

The suggestion of `needless_continue` cannot be made auto applicable, since it would be also necessary to remove code following the linted expression. (Well, maybe it is possible, but I don't know how to do it. Expanding the suggestion span to the last expression, that should be removed didn't work)

changelog: Improve suggestions, when blocks of code are involved

4 years agoAuto merge of #5143 - flip1995:rustup, r=flip1995
bors [Thu, 6 Feb 2020 20:53:17 +0000 (20:53 +0000)]
Auto merge of #5143 - flip1995:rustup, r=flip1995

Rustup to rust-lang/rust#68788

cc rust-lang/rust#68901

changelog: none

4 years agoRustup to rust-lang/rust#68788
flip1995 [Thu, 6 Feb 2020 19:29:58 +0000 (20:29 +0100)]
Rustup to rust-lang/rust#68788

4 years agoRename ctx->cx in needless_continue
flip1995 [Wed, 5 Feb 2020 10:09:48 +0000 (11:09 +0100)]
Rename ctx->cx in needless_continue

4 years agoImprove help message in needless_continue
flip1995 [Wed, 5 Feb 2020 09:42:33 +0000 (10:42 +0100)]
Improve help message in needless_continue

4 years agoFix rebase fallout
flip1995 [Wed, 5 Feb 2020 08:55:48 +0000 (09:55 +0100)]
Fix rebase fallout

4 years agoDocument the indent_relative_to arg of snippet_block
flip1995 [Tue, 4 Feb 2020 16:02:46 +0000 (17:02 +0100)]
Document the indent_relative_to arg of snippet_block

4 years agoUpdate remaining test files
flip1995 [Tue, 4 Feb 2020 15:13:06 +0000 (16:13 +0100)]
Update remaining test files

4 years agoMove tests to the end of the file in utils mod.rs
flip1995 [Tue, 4 Feb 2020 15:12:51 +0000 (16:12 +0100)]
Move tests to the end of the file in utils mod.rs

4 years agoUpdate needless_continue stderr
flip1995 [Tue, 4 Feb 2020 15:11:49 +0000 (16:11 +0100)]
Update needless_continue stderr

4 years agoRewrite suggestion generation of needless_continue
flip1995 [Tue, 4 Feb 2020 15:10:59 +0000 (16:10 +0100)]
Rewrite suggestion generation of needless_continue

4 years agoUpdate block_in_if_condition test files
flip1995 [Tue, 4 Feb 2020 15:08:39 +0000 (16:08 +0100)]
Update block_in_if_condition test files

4 years agoMake block_in_if_condition auto applicable
flip1995 [Tue, 4 Feb 2020 15:08:15 +0000 (16:08 +0100)]
Make block_in_if_condition auto applicable

4 years agoOptionally indent snippet_block relative to an Expr
flip1995 [Tue, 4 Feb 2020 15:07:09 +0000 (16:07 +0100)]
Optionally indent snippet_block relative to an Expr

4 years agoAuto merge of #5139 - lzutao:linecount, r=llogiq
bors [Thu, 6 Feb 2020 15:31:01 +0000 (15:31 +0000)]
Auto merge of #5139 - lzutao:linecount, r=llogiq

dev: Use bytecount for faster line count

changelog: none

4 years agoAuto merge of #5125 - Areredify:too_many_bools, r=flip1995
bors [Thu, 6 Feb 2020 14:47:14 +0000 (14:47 +0000)]
Auto merge of #5125 - Areredify:too_many_bools, r=flip1995

Port mitsuhiko's excessive bools lints

Closes #4 .
changelog: add `struct_excessive_bools` and `fn_params_excessive_bools` lints.
I moved is_trait_impl_item check because at first I implemented it as a late pass for some reason but then I realized it's actually an early lint. But it's a useful function to have, should I move it into a separate pr?

4 years agodev: Use bytecount for faster line count
Lzu Tao [Thu, 6 Feb 2020 14:39:15 +0000 (21:39 +0700)]
dev: Use bytecount for faster line count

4 years agoAuto merge of #5132 - JohnTitor:fix-fp-in-unwrap-lint, r=flip1995
bors [Thu, 6 Feb 2020 14:17:35 +0000 (14:17 +0000)]
Auto merge of #5132 - JohnTitor:fix-fp-in-unwrap-lint, r=flip1995

Do not lint `unnecessary_unwrap` in external macros

Fixes #5131

I think we shouldn't lint `{panicking, unnecessary}_unwrap` in macros, not just `assert!`.

changelog: Fix false positive in `unnecessary_unwrap`

4 years agoAuto merge of #5121 - lzutao:comptest, r=flip1995
bors [Thu, 6 Feb 2020 09:19:29 +0000 (09:19 +0000)]
Auto merge of #5121 - lzutao:comptest, r=flip1995

Improve compile_test and dogfood tests

* Hopefully this finally resolves the "multiple matching crates" error, e.g. #4015
* This handle some convenient CARGO env like CARGO_TARGET_DIR and CARGO_BUILD_TARGET

changelog: none

4 years agoadd excessive bools lints
Areredify [Sat, 1 Feb 2020 23:49:52 +0000 (02:49 +0300)]
add excessive bools lints

4 years agoUse lazy_static
Lzu Tao [Wed, 5 Feb 2020 15:13:55 +0000 (16:13 +0100)]
Use lazy_static

4 years agomove is_trait_impl_item check from functions.rs to utils
Areredify [Thu, 30 Jan 2020 23:39:10 +0000 (02:39 +0300)]
move is_trait_impl_item check from functions.rs to utils

4 years agoAdd `serde_derive` to the need-to-be-disambiguated-crates list
Lzu Tao [Wed, 5 Feb 2020 15:00:19 +0000 (22:00 +0700)]
Add `serde_derive` to the need-to-be-disambiguated-crates list

4 years agoFix dogfood to use cargo mod too
Lzu Tao [Sat, 1 Feb 2020 17:00:48 +0000 (00:00 +0700)]
Fix dogfood to use cargo mod too

4 years agocompile-test: Handle CARGO_TARGET_DIR and transitive deps
Lzu Tao [Sat, 1 Feb 2020 10:04:04 +0000 (11:04 +0100)]
compile-test: Handle CARGO_TARGET_DIR and transitive deps

4 years agoAuto merge of #5137 - lzutao:race, r=flip1995
bors [Wed, 5 Feb 2020 14:16:17 +0000 (14:16 +0000)]
Auto merge of #5137 - lzutao:race, r=flip1995

Prevent failing to restart setup-toolchain

If `rustup-toolchain-install-master` fails to install master
toolchain (in case `rustup update` executes at the same remove the
tmp directory), `cargo search` (which use master toolchain after
`rustup override` command) will fail. This leads to setup-toolchain
fails too.

changelog: none

4 years agoPrevent failing to restart setup-toolchain
Lzu Tao [Wed, 5 Feb 2020 13:37:33 +0000 (20:37 +0700)]
Prevent failing to restart setup-toolchain

If `rustup-toolchain-install-master` fails to install master
toolchain (in case `rustup update` executes at the same remove the
tmp directory), `cargo search` (which use master toolchain after
`rustup override` command) will fail. This leads to setup-toolchain
fails too.

4 years agoAuto merge of #5135 - lzutao:config, r=flip1995
bors [Wed, 5 Feb 2020 09:58:15 +0000 (09:58 +0000)]
Auto merge of #5135 - lzutao:config, r=flip1995

Few improvement to `utils::conf` module

* Fix a few typos
* Handle Option<&Path> early
* Use `env::var_os` when possible

changelog: none

4 years agoFew improvement to `utils::conf` module
Lzu Tao [Wed, 5 Feb 2020 02:06:34 +0000 (09:06 +0700)]
Few improvement to `utils::conf` module

* Fix a few typos
* Handle Option<&Path> early
* Use `env::var_os` when possible

4 years agoAuto merge of #5061 - ThibsG:UselessMatch3664, r=flip1995
bors [Tue, 4 Feb 2020 22:16:13 +0000 (22:16 +0000)]
Auto merge of #5061 - ThibsG:UselessMatch3664, r=flip1995

Add new lint: match with a single binding statement

This lint catches `match` statements that binds to only one block and could be rewritten using a simple `let` statement.

Lint name: MATCH_SINGLE_BINDING

fixes: #3664

changelog: add lint for match with single binding statement

4 years agoManage macros case + move to MaybeIncorrect when binding values
ThibsG [Tue, 4 Feb 2020 19:19:20 +0000 (20:19 +0100)]
Manage macros case + move to MaybeIncorrect when binding values

4 years agoMerge fixes
ThibsG [Tue, 4 Feb 2020 07:20:49 +0000 (08:20 +0100)]
Merge fixes

4 years agoAdd wild and struct handling
ThibsG [Sun, 26 Jan 2020 16:03:39 +0000 (17:03 +0100)]
Add wild and struct handling

4 years agoUse span_lint_and_sugg + move infaillible lint
ThibsG [Sun, 19 Jan 2020 10:07:13 +0000 (11:07 +0100)]
Use span_lint_and_sugg + move infaillible lint

 - moving infaillible lint to prevent collisions