]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoUse StableHasher in SpanlessHasher
flip1995 [Tue, 22 Oct 2019 09:18:18 +0000 (11:18 +0200)]
Use StableHasher in SpanlessHasher

4 years agoDon't hash spans in SpanlessHasher
flip1995 [Tue, 22 Oct 2019 09:17:16 +0000 (11:17 +0200)]
Don't hash spans in SpanlessHasher

4 years agobuild: remove needless BASE_TESTS env
Lzu Tao [Tue, 22 Oct 2019 09:11:42 +0000 (16:11 +0700)]
build: remove needless BASE_TESTS env

4 years agoEarly exit if errors in integration tests
Lzu Tao [Tue, 22 Oct 2019 05:17:11 +0000 (12:17 +0700)]
Early exit if errors in integration tests

4 years agobuild: remove travis_wait
Lzu Tao [Tue, 22 Oct 2019 03:44:54 +0000 (10:44 +0700)]
build: remove travis_wait

Now the travis CI build time is fast enough to not cause build timeout.

4 years agonit: ! is not on a condition and skips errexit
Lzu Tao [Tue, 22 Oct 2019 03:19:12 +0000 (10:19 +0700)]
nit: ! is not on a condition and skips errexit

4 years agobuild: use shared target dir
Lzu Tao [Fri, 18 Oct 2019 04:10:15 +0000 (11:10 +0700)]
build: use shared target dir

4 years agoAdd lint for debug_assert_with_mut_call
Marcel Hellwig [Wed, 16 Oct 2019 11:25:42 +0000 (13:25 +0200)]
Add lint for debug_assert_with_mut_call

This lint will complain when you put a mutable function/method call
inside a `debug_assert` macro, because it will not be executed in
release mode, therefore it will change the execution flow, which is not
wanted.

4 years agomacos: symlink rustc dev libs to /usr/local/lib
Lzu Tao [Thu, 17 Oct 2019 10:02:24 +0000 (17:02 +0700)]
macos: symlink rustc dev libs to /usr/local/lib

Due to System Integrity Protection (SIP), exporting
LD_LIBRARY_PATH will not work on macOS systems.
Therefore, rather than disable SIP, we could symlink
those rust dev libs to /usr/local/bin.
I already tried install_name_tool(1) but couldn't make
clippy-driver work on CI for whatever reasons.

4 years agobuild: improve script and travis config
Lzu Tao [Mon, 21 Oct 2019 08:09:53 +0000 (15:09 +0700)]
build: improve script and travis config

* fix a diff failure on windows

See https://travis-ci.com/rust-lang/rust-clippy/jobs/245971932#L1625
for an example.

* use cmp instead of diff > /dev/null

* clone single branch instead of clone then checking out

* do not decrypt key if have no diff change

4 years agoAuto merge of #4702 - lzutao:build/debug-integration-clippy, r=phansch
bors [Sun, 20 Oct 2019 11:02:36 +0000 (11:02 +0000)]
Auto merge of #4702 - lzutao:build/debug-integration-clippy, r=phansch

build: use clippy's debug build in integration test

changelog: none

4 years agobuild: use clippy's debug build in integration test
Lzu Tao [Sat, 19 Oct 2019 09:44:29 +0000 (16:44 +0700)]
build: use clippy's debug build in integration test

4 years agoAuto merge of #4692 - lzutao:use-opt-profile-rtim, r=phansch
bors [Sat, 19 Oct 2019 09:14:29 +0000 (09:14 +0000)]
Auto merge of #4692 - lzutao:use-opt-profile-rtim, r=phansch

build: use release build of RTIM

rustup-toolchain-install-master on Travis Windows builds is
unexpectedly slower compared to when run on other OSes.
This commit tries to use release build of RTIM as a mean to
improve performance there.

changelog: none

4 years agoAuto merge of #4700 - lzutao:rustup-65535, r=phansch
bors [Sat, 19 Oct 2019 05:41:18 +0000 (05:41 +0000)]
Auto merge of #4700 - lzutao:rustup-65535, r=phansch

rustup https://github.com/rust-lang/rust/pull/65535

cc https://github.com/rust-lang/rust/issues/65585
changelog: none

4 years agorustup https://github.com/rust-lang/rust/pull/65535
Lzu Tao [Sat, 19 Oct 2019 05:27:21 +0000 (12:27 +0700)]
rustup https://github.com/rust-lang/rust/pull/65535

4 years agoAuto merge of #4696 - rust-lang:need-not-use-proc-macro, r=phansch
bors [Fri, 18 Oct 2019 19:40:45 +0000 (19:40 +0000)]
Auto merge of #4696 - rust-lang:need-not-use-proc-macro, r=phansch

Omit proc macros from `must_use_candidate`

This fixes #4684.

changelog: none

4 years agoFix suggestion for ranges
HMPerson1 [Fri, 18 Oct 2019 16:11:15 +0000 (12:11 -0400)]
Fix suggestion for ranges

4 years agoOmit proc macros from `must_use_candidate`
Andre Bogus [Fri, 18 Oct 2019 13:54:25 +0000 (15:54 +0200)]
Omit proc macros from `must_use_candidate`

4 years agoAuto merge of #4657 - Licenser:additional-restrictions, r=flip1995
bors [Fri, 18 Oct 2019 10:32:01 +0000 (10:32 +0000)]
Auto merge of #4657 - Licenser:additional-restrictions, r=flip1995

Additional restrictions

Add restriction lints for `panic!`, `unreachable!`, `todo!` and `.expect(...)`

changelog: Add 5 new `restriction` lints: `panic`, `unreachable`, `todo`, `option_expect_used`, `result_expect_used`

4 years agobuild: use release build of RTIM
Lzu Tao [Fri, 18 Oct 2019 07:58:26 +0000 (14:58 +0700)]
build: use release build of RTIM

rustup-toolchain-install-master on Travis Windows builds is
unexpectedly slower when it was running on other OSes.
This commit tries to use release build of RTIM as a mean to
improve performance there.

4 years agoSplit out tests
Heinz N. Gies [Wed, 16 Oct 2019 17:43:26 +0000 (19:43 +0200)]
Split out tests

4 years agoAdd expect
Heinz N. Gies [Tue, 15 Oct 2019 19:33:07 +0000 (21:33 +0200)]
Add expect

Co-Authored-By: Philipp Krones <hello@philkrones.com>
4 years agoAdd todo and tests
Heinz N. Gies [Sat, 12 Oct 2019 11:26:14 +0000 (13:26 +0200)]
Add todo and tests

4 years agoadd restirction for unreachable and panic
Heinz Gies [Fri, 11 Oct 2019 11:58:56 +0000 (13:58 +0200)]
add restirction for unreachable and panic

4 years agoFix suggestion span in `explicit_counter_loop`
HMPerson1 [Fri, 18 Oct 2019 05:15:54 +0000 (01:15 -0400)]
Fix suggestion span in `explicit_counter_loop`

4 years agoAuto merge of #4687 - lzutao:before-cache-appveyor, r=Manishearth
bors [Fri, 18 Oct 2019 04:53:16 +0000 (04:53 +0000)]
Auto merge of #4687 - lzutao:before-cache-appveyor, r=Manishearth

appveyor: on_finish run after saving cache

According to <https://www.appveyor.com/docs/build-configuration/#build-pipeline>
on_finish step runs after saving cache step, we should use after_test instead.

changelog: none

4 years agoSuggest calling `iter` if needed in `explicit_counter_loop`
HMPerson1 [Fri, 18 Oct 2019 04:03:27 +0000 (00:03 -0400)]
Suggest calling `iter` if needed in `explicit_counter_loop`

4 years agoAuto merge of #4685 - HMPerson1:patch-1, r=Manishearth
bors [Fri, 18 Oct 2019 02:51:04 +0000 (02:51 +0000)]
Auto merge of #4685 - HMPerson1:patch-1, r=Manishearth

Update adding_lints.md

changelog: none

4 years agoAuto merge of #4686 - lzutao:fix-travis-windows-stuck, r=Manishearth
bors [Fri, 18 Oct 2019 01:02:08 +0000 (01:02 +0000)]
Auto merge of #4686 - lzutao:fix-travis-windows-stuck, r=Manishearth

travis: Windows build might be stuck as non-supported languages

See <https://docs.travis-ci.com/user/reference/windows/#supported-languages>
for list of Windows supported languages.

I'm sorry for making Travis Windows build stuck.

changelog: none

4 years agoAuto merge of #4683 - HMPerson1:inefficient_to_string, r=Manishearth
bors [Thu, 17 Oct 2019 23:48:55 +0000 (23:48 +0000)]
Auto merge of #4683 - HMPerson1:inefficient_to_string, r=Manishearth

Add `inefficient_to_string` lint

Closes #4586

changelog: Add `inefficient_to_string` lint, which checks for calling `to_string` on `&&str`, which would bypass the `str`'s specialization

4 years agoUpdate help text in `inefficient_to_string`
Michael Zhang [Thu, 17 Oct 2019 23:11:51 +0000 (19:11 -0400)]
Update help text in `inefficient_to_string`

Co-Authored-By: Manish Goregaokar <manishsmail@gmail.com>
4 years agoAuto merge of #4689 - Manishearth:rustup, r=Yaahc
bors [Thu, 17 Oct 2019 23:00:08 +0000 (23:00 +0000)]
Auto merge of #4689 - Manishearth:rustup, r=Yaahc

Rustup to rustc 1.40.0-nightly (fa0f7d008 2019-10-17)

changelog: none

4 years agosyntax::ext -> syntax_expand
Manish Goregaokar [Thu, 17 Oct 2019 22:47:28 +0000 (15:47 -0700)]
syntax::ext -> syntax_expand

4 years agoappveyor: on_finish run after saving cache
Lzu Tao [Thu, 17 Oct 2019 17:44:13 +0000 (00:44 +0700)]
appveyor: on_finish run after saving cache

Use after_test instead

4 years agotravis: Windows build might be stuck as non-supported languages
Lzu Tao [Thu, 17 Oct 2019 17:50:59 +0000 (00:50 +0700)]
travis: Windows build might be stuck as non-supported languages

See <https://docs.travis-ci.com/user/reference/windows/#supported-languages>
for list of Windows supported languages.

4 years agoAuto merge of #4659 - lzutao:caching, r=phansch
bors [Thu, 17 Oct 2019 17:16:36 +0000 (17:16 +0000)]
Auto merge of #4659 - lzutao:caching, r=phansch

Cache cargo binaries

changelog: none

4 years agoAdd `run-rustfix` to `inefficient_to_string`
HMPerson1 [Thu, 17 Oct 2019 16:41:45 +0000 (12:41 -0400)]
Add `run-rustfix` to `inefficient_to_string`

4 years agoUpdate adding_lints.md
Michael Zhang [Thu, 17 Oct 2019 16:33:42 +0000 (12:33 -0400)]
Update adding_lints.md

4 years agoDogfood for `inefficient_to_string`
HMPerson1 [Wed, 16 Oct 2019 21:12:41 +0000 (17:12 -0400)]
Dogfood for `inefficient_to_string`

4 years agoAdd `inefficient_to_string` lint
HMPerson1 [Wed, 16 Oct 2019 19:54:20 +0000 (15:54 -0400)]
Add `inefficient_to_string` lint

4 years agoUse CI caching and cargo feature install-upgrade
Lzu Tao [Wed, 16 Oct 2019 06:14:24 +0000 (13:14 +0700)]
Use CI caching and cargo feature install-upgrade

* do not force to install rustfmt
* use cargo-cache
* disable bash trace
* clone single branch

4 years agoAuto merge of #4669 - lzutao:minimal-rustup, r=phansch
bors [Wed, 16 Oct 2019 04:13:38 +0000 (04:13 +0000)]
Auto merge of #4669 - lzutao:minimal-rustup, r=phansch

build: use rustup minimal profile to speed up Rust installation time

changelog: none

4 years agoAuto merge of #4673 - Manishearth:rustup, r=phansch
bors [Tue, 15 Oct 2019 19:58:52 +0000 (19:58 +0000)]
Auto merge of #4673 - Manishearth:rustup, r=phansch

Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15)

changelog: none

4 years agobuild: use rustup minimal profile to speed up Rust installation time
Lzu Tao [Tue, 15 Oct 2019 10:02:11 +0000 (17:02 +0700)]
build: use rustup minimal profile to speed up Rust installation time

4 years agoRustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15)
Manish Goregaokar [Tue, 15 Oct 2019 19:29:28 +0000 (12:29 -0700)]
Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15)

4 years agoAuto merge of #4668 - lzutao:update-rtim, r=flip1995
bors [Tue, 15 Oct 2019 18:34:30 +0000 (18:34 +0000)]
Auto merge of #4668 - lzutao:update-rtim, r=flip1995

 build: switch back to latest official RTIM release

Closes #4666

changelog: none

4 years agoAuto merge of #4671 - flip1995:ice-4671, r=phansch
bors [Tue, 15 Oct 2019 17:57:10 +0000 (17:57 +0000)]
Auto merge of #4671 - flip1995:ice-4671, r=phansch

Fix ICE in `use_self` lint

The ICE is produced by building this span:
https://github.com/rust-lang/rust-clippy/blob/55e7818a06c8d83bead9c81e10e73ba33fb20890/clippy_lints/src/use_self.rs#L55-L60

`span` can start in the file the macro is defined in and end where the macro is called.

changelog: Fix ICE in `use_self` lint

4 years agoEnable integration tests again
flip1995 [Tue, 15 Oct 2019 13:13:09 +0000 (15:13 +0200)]
Enable integration tests again

futures-rs, hyper, rls

4 years agoFix ICE in use_self lint
flip1995 [Tue, 15 Oct 2019 13:11:29 +0000 (15:11 +0200)]
Fix ICE in use_self lint

4 years agoAdd regression test for ICE in use-self lint
flip1995 [Tue, 15 Oct 2019 12:57:54 +0000 (14:57 +0200)]
Add regression test for ICE in use-self lint

4 years agotravis: break out before_script stage to test setup-toolchain work
Lzu Tao [Mon, 14 Oct 2019 18:21:25 +0000 (01:21 +0700)]
travis: break out before_script stage to test setup-toolchain work

4 years agobuild: do not trace deploy step
Lzu Tao [Mon, 14 Oct 2019 17:56:27 +0000 (00:56 +0700)]
build: do not trace deploy step

4 years agoEarly exit if there is any errors
Lzu Tao [Mon, 14 Oct 2019 17:51:41 +0000 (00:51 +0700)]
Early exit if there is any errors

4 years agobuild: switch back to latest official RTIM release
Lzu Tao [Mon, 14 Oct 2019 17:45:48 +0000 (00:45 +0700)]
build: switch back to latest official RTIM release

4 years agoAuto merge of #4619 - james9909:unused-self, r=flip1995
bors [Tue, 15 Oct 2019 08:16:39 +0000 (08:16 +0000)]
Auto merge of #4619 - james9909:unused-self, r=flip1995

Add a lint for unused self

changelog: Adds a new lint: `unused_self`

Closes #4550.

4 years agoChange terminology from static to associated
James Wang [Mon, 14 Oct 2019 19:23:24 +0000 (14:23 -0500)]
Change terminology from static to associated

4 years agoSwitch to OnlyBodies
James Wang [Sun, 6 Oct 2019 18:12:07 +0000 (13:12 -0500)]
Switch to OnlyBodies

4 years agoChange lint to be pedantic
James Wang [Fri, 4 Oct 2019 17:18:52 +0000 (12:18 -0500)]
Change lint to be pedantic

4 years agoRemove prints
James Wang [Thu, 3 Oct 2019 19:38:33 +0000 (14:38 -0500)]
Remove prints

4 years agoAdd a new lint for unused self
James Wang [Thu, 3 Oct 2019 19:09:32 +0000 (14:09 -0500)]
Add a new lint for unused self

4 years agoAuto merge of #4560 - rust-lang:must-use-pure, r=phansch
bors [Mon, 14 Oct 2019 17:33:30 +0000 (17:33 +0000)]
Auto merge of #4560 - rust-lang:must-use-pure, r=phansch

new lints around`#[must_use]`

changelog: Add `must_use_candidate` lint,  add `must-use-unit` lint, add `double_must_use` lint

The first one checks if an public function or method has no mutable argument and mutates no non-local data and lints if it has no `#[must_use]` attribute. It will skip inner functions, because those are usually highly local and the attribute doesn't have as much benefit there.

The second lints `#[must_use]` attributes on functions and methods that return unit. Those attributes are likely a remnant from a refactoring that removed the return value.

The last one lints for `#[must_use]` attributrs without text on functions that return a type which is already marked `#[must_use]`. This has no auto-suggestion, because while it would be easy to do, there may be value in writing a detailed text for the attribute instead.

This fixes #4526

4 years agoAuto merge of #4663 - lzutao:rustup, r=phansch
bors [Mon, 14 Oct 2019 17:00:46 +0000 (17:00 +0000)]
Auto merge of #4663 - lzutao:rustup, r=phansch

Rustup

changelog: none

Suppresses #4662.

r? @phansch

4 years agonew lints around `#[must_use]` fns
Andre Bogus [Wed, 18 Sep 2019 06:37:41 +0000 (08:37 +0200)]
new lints around `#[must_use]` fns

`must_use_unit` lints unit-returning functions with a `#[must_use]`
attribute, suggesting to remove it.

`double_must_use` lints functions with a plain `#[must_use]`
attribute, but which return a type which is already `#[must_use]`,
so the attribute has no benefit.

`must_use_candidate` is a pedantic lint that lints functions and
methods that return some non-unit type that is not already
`#[must_use]` and suggests to add the annotation.

4 years agorustc-dev has been temporarily removed
Lzu Tao [Mon, 14 Oct 2019 03:25:05 +0000 (10:25 +0700)]
rustc-dev has been temporarily removed

4 years agoUse my RTIM fork
Lzu Tao [Sun, 13 Oct 2019 17:47:36 +0000 (00:47 +0700)]
Use my RTIM fork

4 years agoBump compiletest
Manish Goregaokar [Sun, 13 Oct 2019 14:46:14 +0000 (07:46 -0700)]
Bump compiletest

4 years agoAuto merge of #4649 - Lythenas:use_match_function_call, r=phansch
bors [Sat, 12 Oct 2019 06:40:13 +0000 (06:40 +0000)]
Auto merge of #4649 - Lythenas:use_match_function_call, r=phansch

Use match_function_call wherever possible

Move `match_function_call` to `utils` and use it wherever possible as discussed in #4635.

changelog: none

4 years agoAuto merge of #4654 - lzutao:rustc-dev, r=phansch
bors [Sat, 12 Oct 2019 06:00:52 +0000 (06:00 +0000)]
Auto merge of #4654 - lzutao:rustc-dev, r=phansch

Rustup for rustc-dev

cc https://github.com/rust-lang/rust/pull/64823
Closes #4651
changelog: none

4 years agouse git version
Lzu Tao [Sat, 12 Oct 2019 03:18:31 +0000 (10:18 +0700)]
use git version

4 years agoFix ICE #4579
flip1995 [Fri, 27 Sep 2019 13:36:56 +0000 (15:36 +0200)]
Fix ICE #4579

4 years agoAdd regression test for ICE #4579
flip1995 [Fri, 27 Sep 2019 13:36:20 +0000 (15:36 +0200)]
Add regression test for ICE #4579

4 years agoRustup for rustc-dev
Lzu Tao [Fri, 11 Oct 2019 08:53:55 +0000 (15:53 +0700)]
Rustup for rustc-dev

4 years agoUse match_function_call wherever possible
Matthias Seiffert [Thu, 10 Oct 2019 18:00:43 +0000 (20:00 +0200)]
Use match_function_call wherever possible

4 years agoMove match_function_call to utils
Matthias Seiffert [Thu, 10 Oct 2019 08:57:12 +0000 (10:57 +0200)]
Move match_function_call to utils

4 years agoAuto merge of #4646 - lzutao:make-pr-guides-visible, r=flip1995
bors [Thu, 10 Oct 2019 07:14:41 +0000 (07:14 +0000)]
Auto merge of #4646 - lzutao:make-pr-guides-visible, r=flip1995

PR template might not be stripped by contributors

cc d97fbdbb42c28ec9e051b23138d7898bae6836c4

So I think it would be better to make the template visible.
Also I renamed the template with extension `.md`.

changelog: none

4 years agoPR template might not be stripped by contributors
Lzu Tao [Wed, 9 Oct 2019 17:57:57 +0000 (00:57 +0700)]
PR template might not be stripped by contributors

4 years agoAuto merge of #4616 - mati865:license, r=Manishearth
bors [Wed, 9 Oct 2019 16:09:26 +0000 (16:09 +0000)]
Auto merge of #4616 - mati865:license, r=Manishearth

Fix license in Cargo.toml files

Missed in https://github.com/rust-lang/rust-clippy/pull/3269

changelog: none

r? @Manishearth

4 years agoAuto merge of #4615 - nikofil:suspicious_unary_op_formatting, r=flip1995
bors [Wed, 9 Oct 2019 15:26:33 +0000 (15:26 +0000)]
Auto merge of #4615 - nikofil:suspicious_unary_op_formatting, r=flip1995

New lint: suspicious_unary_op_formatting

fixes #4228

changelog: New lint: [`suspicious_unary_op_formatting`]

4 years agoNew lint: suspicious_unary_op_formatting
Nikos Filippakis [Thu, 3 Oct 2019 15:45:58 +0000 (17:45 +0200)]
New lint: suspicious_unary_op_formatting

Lints when, on the RHS of a BinOp, there is a UnOp without a space
before the operator but with a space after (e.g. foo >- 1).

Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
4 years agoAuto merge of #4635 - Lythenas:suggestions-for-assert-false, r=flip1995
bors [Wed, 9 Oct 2019 08:56:30 +0000 (08:56 +0000)]
Auto merge of #4635 - Lythenas:suggestions-for-assert-false, r=flip1995

Add assert message to suggestion in lint assertions_on_constants

<!--
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.

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

[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints

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 -->

- [x] suggest replacing `assert!(false, "msg")` with `panic!("msg")`
- [x] extend to allow ~~variables~~ any expression for `"msg"`
- ~~suggest replacing `assert!(false, "msg {}", "arg")` with `panic!("msg {}", "arg")`~~

changelog: add assert message to suggestion in lint assertions_on_constants

Work towards fixing: #3575

4 years agoAuto merge of #4602 - EthanTheMaster:issue-4001, r=flip1995
bors [Tue, 8 Oct 2019 16:17:48 +0000 (16:17 +0000)]
Auto merge of #4602 - EthanTheMaster:issue-4001, r=flip1995

Add suggestion for mul_add

Issue #4001: Whenever `a*b+c` is found where `a`,`b`, and `c` are floats, a lint is suggested saying to use `a.mul_add(b, c)`. Using `mul_add` may give a performance boost depending on the target architecture and also has higher numerical accuracy as there is no round off when doing `a*b`.

changelog: New lint: `manual_mul_add`

4 years agoAddresses Issue #4001
Ethan Lam [Sat, 28 Sep 2019 18:40:10 +0000 (13:40 -0500)]
Addresses Issue #4001

Fixed typo

Fixes lint name and uses appropriate linting suggestion

changed lint help message

Added autofixable test

Added Autofixable Test

Removed Broken Autofixable File

updated lints

Generated Autofixable/Nonfixable Test Cases

Changed Suggestion Applicability

Updated Lint Count

4 years agoAuto merge of #4641 - sinkuu:revert_workaround, r=phansch
bors [Tue, 8 Oct 2019 08:36:26 +0000 (08:36 +0000)]
Auto merge of #4641 - sinkuu:revert_workaround, r=phansch

Revert "Workaround cargo bug on Windows"

[Cargo is fixed on rust master](https://github.com/rust-lang/rust/pull/65186). This reverts PR #4624.

Fixes #4638

changelog: none

4 years agoAuto merge of #4627 - kerhong:fix-typo-in-inherent-to-string, r=phansch
bors [Tue, 8 Oct 2019 07:52:44 +0000 (07:52 +0000)]
Auto merge of #4627 - kerhong:fix-typo-in-inherent-to-string, r=phansch

Fix typo in inherent_to_string documentation

A simple typo fix in `inherent_to_string` and `inherent_to_string_shadow_display` documentation

changelog: none

4 years agoAuto merge of #4611 - rust-lang:doc-visibility, r=flip1995
bors [Tue, 8 Oct 2019 07:11:26 +0000 (07:11 +0000)]
Auto merge of #4611 - rust-lang:doc-visibility, r=flip1995

account for doc visibility

This fixes #4608.

Also I noticed that the lint failed to look at trait and impl items. There's a small bit of fallout in the code, too, but not enough to warrant its own commit.

changelog: check docs of trait items and impl items, also make `missing_safety_doc` account for visibility

4 years agoAuto merge of #4595 - rust-lang:rustbot, r=flip1995
bors [Tue, 8 Oct 2019 06:30:50 +0000 (06:30 +0000)]
Auto merge of #4595 - rust-lang:rustbot, r=flip1995

Allow everyone to assign labels with rustbot

Also allows people to claim issues even if they aren't part of the org

changelog: none

4 years agoAuto merge of #4592 - rust-lang:transmute-collection, r=flip1995
bors [Tue, 8 Oct 2019 05:51:07 +0000 (05:51 +0000)]
Auto merge of #4592 - rust-lang:transmute-collection, r=flip1995

New lint: `unsound_collection_transmute`

changelog: Add `unsound_collection_transmute` lint

This fixes #4515

4 years agoRevert "Workaround cargo bug on Windows"
Shotaro Yamada [Tue, 8 Oct 2019 05:20:24 +0000 (14:20 +0900)]
Revert "Workaround cargo bug on Windows"

This reverts commit 248251b3b26c5f21e2c2f5bfa5d85cc17b13fc05.
This reverts commit 20b73514395bb442fb16ce913b6c2b3965ff3156.

4 years agoAuto merge of #4628 - flip1995:rustup, r=phansch
bors [Tue, 8 Oct 2019 05:09:53 +0000 (05:09 +0000)]
Auto merge of #4628 - flip1995:rustup, r=phansch

Rustup to rust-lang/rust#64874

TODO:
- [x] replace `rvalue_promotable_map` in [1]
- [ ] ~~fix [2] according to this comment https://github.com/rust-lang/rust/pull/64874#issuecomment-536203626 this should be merged with `consume`, but I didn't figure out how to merge them, yet.~~
- [ ] ~~fix [3]; What to do with `LoanCause`?~~

[2]+[3] probably have to be resolved by a rewrite of the lint. https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944

[1]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/methods/mod.rs#L1292-L1299

[2]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L126

[3]
https://github.com/rust-lang/rust-clippy/blob/54bf4ffd626970e831bb80c037f804a3b3450835/clippy_lints/src/escape.rs#L166-L176

I could need some help with [1]. The purpose of this is to "don't lint for constant values". cc @matthewjasper

For now I see what I can do with [2].

changelog: Temporary break `boxed_local` lint.

4 years agoReduce duplication
Matthias Seiffert [Mon, 7 Oct 2019 20:08:00 +0000 (22:08 +0200)]
Reduce duplication

4 years agoMatch any expr for panic message
Matthias Seiffert [Mon, 7 Oct 2019 18:40:05 +0000 (20:40 +0200)]
Match any expr for panic message

4 years agoMake if_chain more readable
Matthias Seiffert [Sun, 6 Oct 2019 18:10:30 +0000 (20:10 +0200)]
Make if_chain more readable

4 years agoAdd message to replace assert!(false) help
Matthias Seiffert [Sat, 5 Oct 2019 14:45:02 +0000 (16:45 +0200)]
Add message to replace assert!(false) help

4 years agoMove is_argument check into mutate
flip1995 [Sun, 6 Oct 2019 12:49:26 +0000 (14:49 +0200)]
Move is_argument check into mutate

4 years agoRun util/dev fmt
flip1995 [Sat, 5 Oct 2019 10:42:09 +0000 (12:42 +0200)]
Run util/dev fmt

4 years agoGet rid of rvalue_promotable_map method call
flip1995 [Sat, 5 Oct 2019 10:38:38 +0000 (12:38 +0200)]
Get rid of rvalue_promotable_map method call

4 years agoMerge consume and consume_pat in escape analysis
flip1995 [Sat, 5 Oct 2019 10:23:59 +0000 (12:23 +0200)]
Merge consume and consume_pat in escape analysis

FIXME: This doesn't work and probably needs a rewrite of the lint

See https://github.com/rust-lang/rust-clippy/pull/4628#issuecomment-538574944

4 years agoUse new format of licenses
Mateusz Mikuła [Fri, 4 Oct 2019 15:39:23 +0000 (17:39 +0200)]
Use new format of licenses

Co-Authored-By: lzutao <taolzu@gmail.com>
4 years agoFix needless_pass_by_value
flip1995 [Fri, 4 Oct 2019 13:00:01 +0000 (15:00 +0200)]
Fix needless_pass_by_value

This also accidentally improved the spans of the suggestions

4 years agoRustup to rust-lang/rust#64874
flip1995 [Fri, 4 Oct 2019 12:24:47 +0000 (14:24 +0200)]
Rustup to rust-lang/rust#64874

Episode 1 - The simple cases