]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agorustup https://github.com/rust-lang/rust/pull/60586
Matthias Krüger [Wed, 8 May 2019 04:58:37 +0000 (06:58 +0200)]
rustup https://github.com/rust-lang/rust/pull/60586

cc https://github.com/rust-lang/rust/issues/60623

5 years agoAuto merge of #4064 - mikerite:fix-771, r=matthiaskrgr
bors [Tue, 7 May 2019 04:35:42 +0000 (04:35 +0000)]
Auto merge of #4064 - mikerite:fix-771, r=matthiaskrgr

Add test for #771.

Closes #771

<!--
Thank you for making Clippy better!

We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.

If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.

If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.

- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo fmt`

Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.

Delete this line and everything above before opening your PR -->

changelog: none

5 years agoAdd test for #771.
Michael Wright [Tue, 7 May 2019 04:28:51 +0000 (06:28 +0200)]
Add test for #771.

Closes #771

5 years agoAuto merge of #4063 - mikerite:while_loop_clean_up, r=Manishearth
bors [Mon, 6 May 2019 07:47:59 +0000 (07:47 +0000)]
Auto merge of #4063 - mikerite:while_loop_clean_up, r=Manishearth

Clean up while_loop tests

At some stage, we started adding test cases inside the function which tests
refutable patterns. This commits splits those test cases out into separate
functions.

5 years agoClean up while_loop tests
Michael Wright [Mon, 6 May 2019 05:49:45 +0000 (07:49 +0200)]
Clean up while_loop tests

At some stage, we started adding test cases inside the function which tests
refutable patterns. This commits splits those test cases out into separate
functions.

5 years agoAuto merge of #4061 - rust-lang:rustup, r=phansch
bors [Sat, 4 May 2019 08:17:03 +0000 (08:17 +0000)]
Auto merge of #4061 - rust-lang:rustup, r=phansch

Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)

Trying to deal with changes from https://github.com/rust-lang/rust/pull/60462

Moved from https://github.com/rust-lang/rust-clippy/pull/4060 so everyone can collab on the rustup branch.

5 years agoRustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)
Matthias Krüger [Sat, 4 May 2019 00:03:12 +0000 (02:03 +0200)]
Rustup to rustc 1.36.0-nightly (13fde05b1 2019-05-03)

5 years agoAuto merge of #4059 - rustic-games:into_iter_on_array/doc-fix, r=flip1995
bors [Fri, 3 May 2019 17:58:36 +0000 (17:58 +0000)]
Auto merge of #4059 - rustic-games:into_iter_on_array/doc-fix, r=flip1995

Fix link in into_iter_on_array documentation

The non-inline variant wasn't being rendered correctly.

see: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array

5 years agoFix link in into_iter_on_array documentation
Jean Mertz [Fri, 3 May 2019 15:38:13 +0000 (17:38 +0200)]
Fix link in into_iter_on_array documentation

The non-inline variant wasn't being rendered correctly.

see: https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_array

5 years agoAuto merge of #4053 - euclio:too-many-args-span, r=flip1995
bors [Fri, 3 May 2019 07:26:55 +0000 (07:26 +0000)]
Auto merge of #4053 - euclio:too-many-args-span, r=flip1995

remove function body from "too many args" span

changelog: Remove the function body from the "too many arguments" span.

5 years agoremove function body from "too many args" span
Andy Russell [Wed, 1 May 2019 19:32:54 +0000 (15:32 -0400)]
remove function body from "too many args" span

5 years agoAuto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995
bors [Thu, 2 May 2019 08:45:02 +0000 (08:45 +0000)]
Auto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995

Fix #4033 search_is_some

Fixes #4033.

Suggest `any(|x| ..)` instead of `any(|&x| ..)` for `find(|&x| ..).is_some()` (Lint [search_is_some](https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some))

FnDecl of `find`:

```rust
fn find<P>(&mut self, mut p: P) -> Option<Self::Item> where
    P: FnMut(&Self::Item) -> bool
```

FnDecl of `any`:

```rust
fn any<F>(&mut self, mut f: F) -> bool where
    F: FnMut(Self::Item) -> bool
```

If match on `|&_|` in closure of `find`, only use `|_|` in the suggestion.

PS. It's the first time that I have used the `hir` API, please correct me if there is any mistake 😺

5 years agoAuto merge of #4035 - JoshMcguigan:useless_let_if_seq-3043, r=oli-obk
bors [Thu, 2 May 2019 07:03:28 +0000 (07:03 +0000)]
Auto merge of #4035 - JoshMcguigan:useless_let_if_seq-3043, r=oli-obk

useless_let_if_seq handle interior mutability

fixes #3043

This passes all tests, including a new one specifically dealing with a type with interior mutability. The main thing I'm unsure of is whether the span I used in the call to `is_freeze` is the most appropriate span to use, or if it matters.

5 years agoAuto merge of #4056 - matthiaskrgr:rustup__, r=Manishearth
bors [Wed, 1 May 2019 21:07:44 +0000 (21:07 +0000)]
Auto merge of #4056 - matthiaskrgr:rustup__, r=Manishearth

 more Use->DropTemps fixes

changelog: none

5 years agomore Use->DropTemps fixes
Matthias Krüger [Wed, 1 May 2019 20:52:19 +0000 (22:52 +0200)]
more Use->DropTemps fixes

5 years agorustup https://github.com/rust-lang/rust/pull/60417/
Matthias Krüger [Wed, 1 May 2019 20:18:05 +0000 (22:18 +0200)]
rustup https://github.com/rust-lang/rust/pull/60417/

cc https://github.com/rust-lang/rust/issues/60448

5 years agoAuto merge of #4048 - matthiaskrgr:driver_version, r=phansch
bors [Wed, 1 May 2019 18:42:58 +0000 (18:42 +0000)]
Auto merge of #4048 - matthiaskrgr:driver_version, r=phansch

clippy-driver: use rustc_tools_util to get version info.

changelog: make "clippy-driver -V" output the same information as "cargo clippy -V"

5 years agoclippy-driver: use rustc_tools_util to get version info.
Matthias Krüger [Tue, 30 Apr 2019 09:10:31 +0000 (11:10 +0200)]
clippy-driver: use rustc_tools_util to get version info.

This will add git hash information to `clippy-driver -V` output.

5 years agoAuto merge of #4051 - yaahallo:master, r=Manishearth
bors [Wed, 1 May 2019 01:55:14 +0000 (01:55 +0000)]
Auto merge of #4051 - yaahallo:master, r=Manishearth

use clippy-preview instead of clippy in dogfood

changelog: switch dogfood tests to use cargo clippy-preview

closes #4050

5 years agouse clippy-preview instead of clippy in cargo
Jane Lusby [Wed, 1 May 2019 01:29:25 +0000 (18:29 -0700)]
use clippy-preview instead of clippy in cargo

5 years agocheck closure arguments before use it
airt [Tue, 30 Apr 2019 20:41:00 +0000 (04:41 +0800)]
check closure arguments before use it

5 years agoformat code
airt [Tue, 30 Apr 2019 20:03:51 +0000 (04:03 +0800)]
format code

5 years agoAuto merge of #4039 - andrehjr:add-find-map-lints, r=flip1995
bors [Tue, 30 Apr 2019 20:00:33 +0000 (20:00 +0000)]
Auto merge of #4039 - andrehjr:add-find-map-lints, r=flip1995

Add lints for find_map

changelog: adds lints for find_map and filter_map_next. Closes issue #3474

Hope I got everything correctly this time! Let me know if I missed something.

5 years agoUpdate find(p).map(p) occurrences to use find_map(p)
André Luis Leal Cardoso Junior [Sun, 28 Apr 2019 18:19:05 +0000 (15:19 -0300)]
Update find(p).map(p) occurrences to use find_map(p)

5 years agoAdd lints for find_map
André Luis Leal Cardoso Junior [Sat, 27 Apr 2019 22:06:35 +0000 (19:06 -0300)]
Add lints for find_map

5 years agofix suggestion for search_is_some
airt [Tue, 30 Apr 2019 19:09:27 +0000 (03:09 +0800)]
fix suggestion for search_is_some

5 years agofix suggestion for search_is_some naively
airt [Tue, 30 Apr 2019 17:08:16 +0000 (01:08 +0800)]
fix suggestion for search_is_some naively

5 years agochange |&x| to |x| in stderr file
airt [Tue, 30 Apr 2019 17:06:15 +0000 (01:06 +0800)]
change |&x| to |x| in stderr file

5 years agoAuto merge of #4045 - matthiaskrgr:RTU, r=phansch
bors [Tue, 30 Apr 2019 07:20:58 +0000 (07:20 +0000)]
Auto merge of #4045 - matthiaskrgr:RTU, r=phansch

rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.

changelog: rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.

5 years agoAuto merge of #4047 - rust-lang:rustup, r=Centril
bors [Tue, 30 Apr 2019 05:34:55 +0000 (05:34 +0000)]
Auto merge of #4047 - rust-lang:rustup, r=Centril

Rustup to rustc 1.36.0-nightly (f843ad60e 2019-04-30)

None

5 years agoRustup to rustc 1.36.0-nightly (f843ad60e 2019-04-30)
Manish Goregaokar [Tue, 30 Apr 2019 05:31:39 +0000 (22:31 -0700)]
Rustup to rustc 1.36.0-nightly (f843ad60e 2019-04-30)

5 years agoAuto merge of #4032 - phansch:add_tests, r=phansch
bors [Mon, 29 Apr 2019 07:03:54 +0000 (07:03 +0000)]
Auto merge of #4032 - phansch:add_tests, r=phansch

Add two more tests for redundant_closure

These two cases were fixed by #4008.

Closes #1439

changelog: none

5 years agoAuto merge of #4046 - rust-lang:rustup, r=phansch
bors [Mon, 29 Apr 2019 05:43:23 +0000 (05:43 +0000)]
Auto merge of #4046 - rust-lang:rustup, r=phansch

Rustup to rustc 1.36.0-nightly (c7fcbfbf1 2019-04-29)

Updates to pass the lint introduced in https://github.com/rust-lang/rust/pull/60317

r? @oli-obk @mikerite

5 years agoRustup to rustc 1.36.0-nightly (c7fcbfbf1 2019-04-29)
Manish Goregaokar [Mon, 29 Apr 2019 04:58:03 +0000 (21:58 -0700)]
Rustup to rustc 1.36.0-nightly (c7fcbfbf1 2019-04-29)

See https://github.com/rust-lang/rust/pull/60317

5 years agoAuto merge of #4044 - matthiaskrgr:travis_sort_jobs, r=phansch
bors [Sun, 28 Apr 2019 21:34:09 +0000 (21:34 +0000)]
Auto merge of #4044 - matthiaskrgr:travis_sort_jobs, r=phansch

travis: sort integration test jobs so that the jobs taking the most time are run first

changelog: none

5 years agorustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when...
Matthias Krüger [Sun, 28 Apr 2019 18:07:49 +0000 (20:07 +0200)]
rustc_tools_util: try to handle case of not having CFG_RELEASE_CHANNEL better when getting compiler channel.

5 years agotravis: sort integration test jobs so that the jobs taking the most time are run...
Matthias Krüger [Sun, 28 Apr 2019 18:45:10 +0000 (20:45 +0200)]
travis: sort integration test jobs so that the jobs taking the most time are run first

5 years agoAuto merge of #4043 - rust-lang:map-clone-iter, r=matthiaskrgr
bors [Sun, 28 Apr 2019 18:39:00 +0000 (18:39 +0000)]
Auto merge of #4043 - rust-lang:map-clone-iter, r=matthiaskrgr

Suggest .copied() for map_clone on iterators too

fixes https://github.com/rust-lang/rust-clippy/issues/3958

changelog: Make `map_clone` suggest the newly-stable `Iterator::copied()` when applicable

r? @mikerite @matthiaskrgr

5 years agoSuggest .copied() for map_clone on iterators too
Manish Goregaokar [Sun, 28 Apr 2019 18:14:39 +0000 (11:14 -0700)]
Suggest .copied() for map_clone on iterators too

5 years agoAuto merge of #4042 - matthiaskrgr:toml_update, r=Manishearth
bors [Sun, 28 Apr 2019 17:29:17 +0000 (17:29 +0000)]
Auto merge of #4042 - matthiaskrgr:toml_update, r=Manishearth

deps: bump toml from 0.4 to 0.5

changelog: none

5 years agodeps: bump toml from 0.4 to 0.5
Matthias Krüger [Sun, 28 Apr 2019 17:24:36 +0000 (19:24 +0200)]
deps: bump toml from 0.4 to 0.5

5 years agoAuto merge of #4040 - mikerite:fix-build-20190428, r=Manishearth
bors [Sun, 28 Apr 2019 15:19:12 +0000 (15:19 +0000)]
Auto merge of #4040 - mikerite:fix-build-20190428, r=Manishearth

Fix breakage due to rust-lang/rust#60225

Wrote this up before I saw that Manish already started on a fix in #4038. It no doubt contains errors. Feel free to close.

5 years agoFix breakage due to rust-lang/rust#60225
Michael Wright [Sun, 28 Apr 2019 07:11:20 +0000 (09:11 +0200)]
Fix breakage due to rust-lang/rust#60225

5 years agoAdd two more tests for redundant_closure
Philipp Hansch [Thu, 25 Apr 2019 19:46:34 +0000 (21:46 +0200)]
Add two more tests for redundant_closure

These two cases were fixed by #4008.

Closes #1439

changelog: none

5 years agocargo fmt
Josh Mcguigan [Fri, 26 Apr 2019 02:41:23 +0000 (19:41 -0700)]
cargo fmt

5 years agouseless_let_if_seq handle interior mutability
Josh Mcguigan [Fri, 26 Apr 2019 02:07:01 +0000 (19:07 -0700)]
useless_let_if_seq handle interior mutability

5 years agoAuto merge of #4008 - g-bartoszek:boxed-fnmut, r=phansch
bors [Thu, 25 Apr 2019 18:13:47 +0000 (18:13 +0000)]
Auto merge of #4008 - g-bartoszek:boxed-fnmut, r=phansch

Do not trigger redundant_closure for non-function types

fixes #3898

Added a check for the entity being called in the closure body to be a FnDef. This way lint does not trigger for ADTs (Box) but I'm not sure if it's correct and not too restrictive.

<!--
Thank you for making Clippy better!

We're collecting our changelog from pull request descriptions.
If your PR only updates to the latest nightly, you can leave the
`changelog` entry as `none`. Otherwise, please write a short comment
explaining your change.

If your PR fixes an issue, you can add "fixes #issue_number" into this
PR description. This way the issue will be automatically closed when
your PR is merged.

If you added a new lint, here's a checklist for things that will be
checked during review or continuous integration.

- [ ] Followed [lint naming conventions][lint_naming]
- [ ] Added passing UI tests (including committed `.stderr` file)
- [ ] `cargo test` passes locally
- [ ] Executed `util/dev update_lints`
- [ ] Added lint documentation
- [ ] Run `cargo fmt`

Note that you can skip the above if you are just opening a WIP PR in
order to get feedback.

Delete this line and everything above before opening your PR -->

changelog: Fix false positive in `redundant_closure` pertaining to non-function types

5 years agoAuto merge of #4026 - cemiloten:working-on-#3981, r=flip1995
bors [Thu, 25 Apr 2019 10:37:30 +0000 (10:37 +0000)]
Auto merge of #4026 - cemiloten:working-on-#3981, r=flip1995

Attempt to fix #3981

Fixes #3981

Hi, hopefully this is correct, happy to have feedback.

changelog: Don't trigger `unnecessary_cast` inside a macro

5 years agoIgnore unnecessary cast if inside macro
cemil [Wed, 24 Apr 2019 14:02:38 +0000 (16:02 +0200)]
Ignore unnecessary cast if inside macro

5 years agoAuto merge of #4029 - phansch:update_pulldown_cmark, r=oli-obk
bors [Thu, 25 Apr 2019 09:16:46 +0000 (09:16 +0000)]
Auto merge of #4029 - phansch:update_pulldown_cmark, r=oli-obk

Update pulldown_cmark to 0.5

We now no longer have to use our own wrapper around `Parser` and can use
the new `OffsetIter`.

changelog: none

5 years agoAuto merge of #4028 - phansch:skip_appveyor_on_pr_pushes, r=phansch
bors [Thu, 25 Apr 2019 06:38:38 +0000 (06:38 +0000)]
Auto merge of #4028 - phansch:skip_appveyor_on_pr_pushes, r=phansch

Only run AppVeyor on r+, try and the master branch

As it is right now, there is only one worker available in the `rust-lang-libs`
AppVeyor project and there are other repos as well that we share this worker
with. This has been a problem for us because we sometimes hit a bors timeout if there
are too many builds queued up.

To improve the situation, I think we could try to use AppVeyor a bit less
often. The average PR is not going to break windows related things anyway, so
it should be fine to run it on r+/try/master only.

changelog: none

5 years agoAuto merge of #4030 - phansch:rustup190425, r=Manishearth
bors [Thu, 25 Apr 2019 05:33:37 +0000 (05:33 +0000)]
Auto merge of #4030 - phansch:rustup190425, r=Manishearth

Rustup for https://github.com/rust-lang/rust/pull/59042

changelog: none

5 years agoRustup for https://github.com/rust-lang/rust/pull/59042
Philipp Hansch [Thu, 25 Apr 2019 05:29:23 +0000 (07:29 +0200)]
Rustup for https://github.com/rust-lang/rust/pull/59042

5 years agoUpdate pulldown_cmark to 0.5
Philipp Hansch [Wed, 24 Apr 2019 05:47:01 +0000 (07:47 +0200)]
Update pulldown_cmark to 0.5

We now no longer have to use our own wrapper around `Parser` and can use
the new `OffsetIter`.

5 years agoAuto merge of #4027 - kraai:remove-approx_constant-known-problems, r=phansch
bors [Wed, 24 Apr 2019 20:40:36 +0000 (20:40 +0000)]
Auto merge of #4027 - kraai:remove-approx_constant-known-problems, r=phansch

Remove approx_constant known problems

Fixes #4025.

changelog: Remove `approx_constant`'s documentation's "Known problems" section.

5 years agoOnly run AppVeyor on r+, try and the master branch
Philipp Hansch [Wed, 24 Apr 2019 18:25:59 +0000 (20:25 +0200)]
Only run AppVeyor on r+, try and the master branch

As it is right now, there is only one worker available in the `rust-lang-libs`
AppVeyor project and there are other repos as well that we share this worker
with. This has been a problem for us because we sometimes hit a bors timeout if there
are too many builds queued up.

To improve the situation, I think we could try to use AppVeyor a bit less
often. The average PR is not going to break windows related things anyway, so
it should be fine to run it on r+/try/master only.

5 years agoAuto merge of #4023 - phansch:add_test, r=flip1995
bors [Wed, 24 Apr 2019 17:16:59 +0000 (17:16 +0000)]
Auto merge of #4023 - phansch:add_test, r=flip1995

Add test for or_fun_call macro suggestion

changelog: none

Closes #1018

5 years agoRemove approx_constant known problems
Matthew Kraai [Wed, 24 Apr 2019 16:01:12 +0000 (09:01 -0700)]
Remove approx_constant known problems

Fixes #4025.

5 years agoAuto merge of #4022 - phansch:move_some_loop_tests, r=flip1995
bors [Wed, 24 Apr 2019 08:29:33 +0000 (08:29 +0000)]
Auto merge of #4022 - phansch:move_some_loop_tests, r=flip1995

UI test cleanup: Extract needless_range_loop tests

changelog: none

5 years agoAuto merge of #4024 - kraai:suppress-let_and_return-if-let-has-attributes, r=flip1995
bors [Wed, 24 Apr 2019 07:29:35 +0000 (07:29 +0000)]
Auto merge of #4024 - kraai:suppress-let_and_return-if-let-has-attributes, r=flip1995

Suppress let_and_return if let has attributes

Fixes #3882.

changelog: suppress `let_and_return` if `let` has attributes

5 years agoSuppress let_and_return if let has attributes
Matthew Kraai [Wed, 24 Apr 2019 06:32:16 +0000 (23:32 -0700)]
Suppress let_and_return if let has attributes

Fixes #3882.

5 years agoAdd test for or_fun_call macro suggestion
Philipp Hansch [Wed, 24 Apr 2019 06:11:20 +0000 (08:11 +0200)]
Add test for or_fun_call macro suggestion

Closes #1018

5 years agoUI test cleanup: Extract needless_range_loop tests
Philipp Hansch [Wed, 24 Apr 2019 06:01:16 +0000 (08:01 +0200)]
UI test cleanup: Extract needless_range_loop tests

5 years agoAuto merge of #4021 - kraai:change-cast_lossless-warning, r=Manishearth
bors [Wed, 24 Apr 2019 05:27:17 +0000 (05:27 +0000)]
Auto merge of #4021 - kraai:change-cast_lossless-warning, r=Manishearth

Change "if types change" to "if you later change the type"

Fixes #3964.

changelog: change wording of `cast_lossless` message

5 years agoChange "if types change" to "if you later change the type"
Matthew Kraai [Tue, 23 Apr 2019 23:53:09 +0000 (16:53 -0700)]
Change "if types change" to "if you later change the type"

Fixes #3964.

5 years agoAuto merge of #4018 - rust-lang:or_fn_call_variants, r=oli-obk
bors [Tue, 23 Apr 2019 18:24:10 +0000 (18:24 +0000)]
Auto merge of #4018 - rust-lang:or_fn_call_variants, r=oli-obk

Ignore non-const ctor expressions in or_fn_call

Fixes https://github.com/rust-lang/rust-clippy/issues/1338

Should have been fixed by #919, however that focuses on const ctor expressions only, and `.or(Some(local))` isn't const.

This also automatically ignores things like `.or(Some(local.clone())` which we don't actually want to do; I need to figure out what to do here.

changelog: Fixed false positive in [`or_fn_call`] pertaining to enum variant constructors

r? @oli-obk @phansch

5 years agoAuto merge of #4020 - rust-lang:rustup, r=phansch
bors [Tue, 23 Apr 2019 16:19:29 +0000 (16:19 +0000)]
Auto merge of #4020 - rust-lang:rustup, r=phansch

Rustup to rustc 1.36.0-nightly (fe0a415b4 2019-04-23)

r? @oli-obk @phansch

5 years agoRustup to rustc 1.36.0-nightly (fe0a415b4 2019-04-23)
Manish Goregaokar [Tue, 23 Apr 2019 15:25:45 +0000 (08:25 -0700)]
Rustup to rustc 1.36.0-nightly (fe0a415b4 2019-04-23)

5 years agoAdd test
Manish Goregaokar [Mon, 22 Apr 2019 22:39:38 +0000 (15:39 -0700)]
Add test

5 years agoIgnore all enum and struct constructors in lints about `*or(call())`
Manish Goregaokar [Mon, 22 Apr 2019 22:31:22 +0000 (15:31 -0700)]
Ignore all enum and struct constructors in lints about `*or(call())`

5 years agoAuto merge of #4017 - Xanewok:wip-disambiguate-extern, r=oli-obk
bors [Tue, 23 Apr 2019 08:37:44 +0000 (08:37 +0000)]
Auto merge of #4017 - Xanewok:wip-disambiguate-extern, r=oli-obk

compiletest: Disambiguate extern crate deps shared with the compiler

Fixes #4015.

changelog: Handle deps shared with the compiler in the internal compiletest suite

Attempts to fix the multiple matching crates error using the `--extern dep=path` disambiguation. This only includes `serde` at the moment because it's the only problematic dep right now (is inside Rust sysroot and pulled via `extern crate` in the test suite).

I'm not exactly sure this is the right approach (FWIW it fixes the issue locally), please do tell if this should be done differently.

5 years agocompiletest: Disambiguate extern crate deps shared with the compiler
Igor Matuszewski [Mon, 22 Apr 2019 13:04:48 +0000 (15:04 +0200)]
compiletest: Disambiguate extern crate deps shared with the compiler

5 years agoAuto merge of #4013 - kraai:move-path_buf_push_overwrite-to-nursery, r=matthiaskrgr
bors [Sun, 21 Apr 2019 20:44:03 +0000 (20:44 +0000)]
Auto merge of #4013 - kraai:move-path_buf_push_overwrite-to-nursery, r=matthiaskrgr

Move path_buf_push_overwrite to nursery

See #4012.

changelog: move `path_buf_push_overwrite` to the nursery

5 years agoAuto merge of #4014 - Xanewok:rustup-60124, r=matthiaskrgr
bors [Sun, 21 Apr 2019 19:38:32 +0000 (19:38 +0000)]
Auto merge of #4014 - Xanewok:rustup-60124, r=matthiaskrgr

rustup: Use newly-introduced mutability query for statics

Fixes fallout from https://github.com/rust-lang/rust/pull/60124.
cc https://github.com/rust-lang/rust/issues/60154

changelog: none

5 years agoUse newly-introduced mutability query for statics
Igor Matuszewski [Sun, 21 Apr 2019 19:00:52 +0000 (21:00 +0200)]
Use newly-introduced mutability query for statics

Fixes fallout from https://github.com/rust-lang/rust/pull/60124.
cc https://github.com/rust-lang/rust/issues/60154

5 years agoMove path_buf_push_overwrite to nursery
Matthew Kraai [Sun, 21 Apr 2019 13:22:06 +0000 (06:22 -0700)]
Move path_buf_push_overwrite to nursery

See #4012.

5 years agoredundant closure triggers for fnptrs and closures
Grzegorz [Sat, 20 Apr 2019 20:20:14 +0000 (22:20 +0200)]
redundant closure triggers for fnptrs and closures

5 years agoAuto merge of #4011 - phansch:add_test_for_derive_expansion, r=flip1995
bors [Sat, 20 Apr 2019 18:55:48 +0000 (18:55 +0000)]
Auto merge of #4011 - phansch:add_test_for_derive_expansion, r=flip1995

Add test for derives for used_underscore_binding lint

This closes #852 as I can't reproduce the original issue anymore.

changelog: none

5 years agoAuto merge of #4007 - phansch:fix_allowing_toplevel_ref_arg, r=flip1995
bors [Sat, 20 Apr 2019 18:22:53 +0000 (18:22 +0000)]
Auto merge of #4007 - phansch:fix_allowing_toplevel_ref_arg, r=flip1995

Allow allowing of toplevel_ref_arg lint

I'm not sure why some lints need the `HirId` to be able to recognize the
lint level attributes, but this commit makes the lint level attributes
work for `toplevel_ref_arg`.

Fixes #2332

changelog: Allow allowing of `toplevel_ref_arg` lint

5 years agoAuto merge of #4005 - phansch:rustfix_match_as_ref, r=flip1995
bors [Sat, 20 Apr 2019 17:21:20 +0000 (17:21 +0000)]
Auto merge of #4005 - phansch:rustfix_match_as_ref, r=flip1995

Add run-rustfix for match_as_ref lint

* Extracts `match_as_ref` into separate file
* Adds `// run-rustfix` to `tests/ui/match_as_ref.rs`

cc #3630

changelog: none

5 years agoAuto merge of #4006 - phansch:fix_module_name_repetitions_fp, r=flip1995
bors [Sat, 20 Apr 2019 16:58:51 +0000 (16:58 +0000)]
Auto merge of #4006 - phansch:fix_module_name_repetitions_fp, r=flip1995

Fix false positive in module_name_repetitions lint

This lint was triggering on modules inside expanded attrs, like
for example `#[cfg(test)]` and possibly more.

It was not reporting a location in #3892 because `span.lo()` and `span.hi()` both were 0.

Fixes #3892

changelog: Fix false positive in `module_name_repetitions` lint

5 years agoAdd test for derives for used_underscore_binding lint
Philipp Hansch [Sat, 20 Apr 2019 07:33:13 +0000 (09:33 +0200)]
Add test for derives for used_underscore_binding lint

This closes #852 as I can't reproduce the original issue anymore.

5 years agoAuto merge of #4009 - phansch:update_compiletest, r=phansch
bors [Fri, 19 Apr 2019 17:11:13 +0000 (17:11 +0000)]
Auto merge of #4009 - phansch:update_compiletest, r=phansch

Update compiletest_rs

This includes a fix that make ICEs appear in UI tests again.

5 years agoUpdate compiletest_rs
Philipp Hansch [Fri, 19 Apr 2019 16:23:25 +0000 (18:23 +0200)]
Update compiletest_rs

This includes a fix that make ICEs appear in UI tests again.

5 years agoAllow allowing of toplevel_ref_arg lint
Philipp Hansch [Fri, 19 Apr 2019 13:18:32 +0000 (15:18 +0200)]
Allow allowing of toplevel_ref_arg lint

I'm not sure why some lints need the `HirId` to be able to recognize the
lint level attributes, but this commit makes the lint level attributes
work for `toplevel_ref_arg`.

5 years agoredundant closure for functions restricted to FnDefs
Grzegorz [Sun, 31 Mar 2019 12:10:17 +0000 (14:10 +0200)]
redundant closure for functions restricted to FnDefs

5 years agoFix false positive in module_name_repetitions lint
Philipp Hansch [Fri, 19 Apr 2019 10:53:03 +0000 (12:53 +0200)]
Fix false positive in module_name_repetitions lint

This lint was triggering on modules inside expanded attrs, like
for example `#[cfg(test)]` and possibly more.

5 years agoAdd run-rustfix for match_as_ref lint
Philipp Hansch [Fri, 19 Apr 2019 10:08:00 +0000 (12:08 +0200)]
Add run-rustfix for match_as_ref lint

* Extracts `match_as_ref` into separate file
* Adds `// run-rustfix` to `tests/ui/match_as_ref.rs`

5 years agoAuto merge of #3989 - flip1995:assert_on_const, r=phansch
bors [Fri, 19 Apr 2019 09:57:35 +0000 (09:57 +0000)]
Auto merge of #3989 - flip1995:assert_on_const, r=phansch

Don't trigger assertions_on_constants on debug_assert!(false)

Fixes #3948
Fixes #3765

changelog: Fix `debug_assert!` false positive on `assertions_on_constants` lint

5 years agoAuto merge of #3990 - felixrabe:patch-1, r=flip1995
bors [Thu, 18 Apr 2019 23:16:15 +0000 (23:16 +0000)]
Auto merge of #3990 - felixrabe:patch-1, r=flip1995

Typo

changelog: none

5 years agoAuto merge of #3978 - phansch:rustfix_len_zero, r=flip1995
bors [Thu, 18 Apr 2019 21:18:23 +0000 (21:18 +0000)]
Auto merge of #3978 - phansch:rustfix_len_zero, r=flip1995

Add run-rustfix for len_zero lint

* Extracts len_without_is_empty into separate file
* Adds `// run-rustfix` to `tests/ui/len_zero.rs`

cc #3630

5 years agoTypo
Felix Rabe [Thu, 18 Apr 2019 13:08:14 +0000 (15:08 +0200)]
Typo

5 years agoFix dogfood error
flip1995 [Thu, 18 Apr 2019 11:37:20 +0000 (13:37 +0200)]
Fix dogfood error

5 years agoAuto merge of #3954 - andrehjr:add-lint-path-buf-overwrite, r=flip1995
bors [Thu, 18 Apr 2019 11:29:43 +0000 (11:29 +0000)]
Auto merge of #3954 - andrehjr:add-lint-path-buf-overwrite, r=flip1995

Add Lint PathBufPushOverwrite

Closes #3923

This is a very simple Lint that checks if push is being called with a Root Path. Because that can make it overwrite the previous path.

I used std::path::Path to check if it's root, in order to keep it working across windows/linux environments instead of checking for '/'. Is that alright?

On the `if_chain!` block, Is there a way to make it short while getting the value of the first argument? I got the example from other lints.

Note that this is first Lint, I hope I got everything covered  🚀

5 years agoAdd lint PathBufPushOverwrite
André Luis Leal Cardoso Junior [Sat, 13 Apr 2019 16:47:46 +0000 (13:47 -0300)]
Add lint PathBufPushOverwrite

5 years agoAuto merge of #3985 - phansch:move_some_cast_tests, r=flip1995
bors [Thu, 18 Apr 2019 10:06:55 +0000 (10:06 +0000)]
Auto merge of #3985 - phansch:move_some_cast_tests, r=flip1995

Move two cast_lossless tests to their correct files

First part of checking off the `tests/ui/cast.rs` checkbox in #3630.

5 years agoUpdate *.stderr file
flip1995 [Thu, 18 Apr 2019 10:05:09 +0000 (12:05 +0200)]
Update *.stderr file

5 years agoRemove code duplication
flip1995 [Thu, 18 Apr 2019 10:04:46 +0000 (12:04 +0200)]
Remove code duplication

5 years agoFormat code
flip1995 [Thu, 18 Apr 2019 09:48:55 +0000 (11:48 +0200)]
Format code

5 years agoAdd test for debug_assert!(false)
flip1995 [Thu, 18 Apr 2019 09:48:19 +0000 (11:48 +0200)]
Add test for debug_assert!(false)