Commit graph

7941 commits

Author SHA1 Message Date
bors
e979eb4cc5 Auto merge of #4689 - Manishearth:rustup, r=Yaahc
Rustup to rustc 1.40.0-nightly (fa0f7d008 2019-10-17)

changelog: none
2019-10-17 23:00:08 +00:00
Manish Goregaokar
fcad3cb9ea syntax::ext -> syntax_expand 2019-10-17 15:57:48 -07:00
Lzu Tao
607f795349 appveyor: on_finish run after saving cache
Use after_test instead
2019-10-18 01:09:37 +07:00
Lzu Tao
c6159961ae 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.
2019-10-18 01:09:32 +07:00
bors
4a388e1fd5 Auto merge of #4659 - lzutao:caching, r=phansch
Cache cargo binaries

changelog: none
2019-10-17 17:16:36 +00:00
HMPerson1
ffb53e7457
Add run-rustfix to inefficient_to_string 2019-10-17 12:41:45 -04:00
Michael Zhang
3328cb25ce
Update adding_lints.md 2019-10-17 12:33:42 -04:00
HMPerson1
106a72592c
Dogfood for inefficient_to_string 2019-10-16 17:12:41 -04:00
HMPerson1
76b44f34b9
Add inefficient_to_string lint 2019-10-16 15:54:20 -04:00
Lzu Tao
d81191e87d Use CI caching and cargo feature install-upgrade
* do not force to install rustfmt
* use cargo-cache
* disable bash trace
* clone single branch
2019-10-16 13:14:24 +07:00
bors
07c06738b7 Auto merge of #4669 - lzutao:minimal-rustup, r=phansch
build: use rustup minimal profile to speed up Rust installation time

changelog: none
2019-10-16 04:13:38 +00:00
bors
52cebb1f8f Auto merge of #4673 - Manishearth:rustup, r=phansch
Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15)

changelog: none
2019-10-15 19:58:52 +00:00
Lzu Tao
7de7d0c97b build: use rustup minimal profile to speed up Rust installation time 2019-10-16 02:38:31 +07:00
Manish Goregaokar
608d09c26c Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15) 2019-10-15 12:29:28 -07:00
bors
ddb5cb787d Auto merge of #4668 - lzutao:update-rtim, r=flip1995
build: switch back to latest official RTIM release

Closes #4666

changelog: none
2019-10-15 18:34:30 +00:00
bors
778ace37e5 Auto merge of #4671 - flip1995:ice-4671, r=phansch
Fix ICE in `use_self` lint

The ICE is produced by building this span:
55e7818a06/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
2019-10-15 17:57:10 +00:00
flip1995
2f108079da
Enable integration tests again
futures-rs, hyper, rls
2019-10-15 15:13:09 +02:00
flip1995
c9dc2b5f6e
Fix ICE in use_self lint 2019-10-15 15:11:29 +02:00
flip1995
2d6adb9424
Add regression test for ICE in use-self lint 2019-10-15 15:02:09 +02:00
Lzu Tao
0b39946b20 travis: break out before_script stage to test setup-toolchain work 2019-10-15 16:47:16 +07:00
Lzu Tao
63a4cd60cd build: do not trace deploy step 2019-10-15 16:47:16 +07:00
Lzu Tao
f4ea5251cb Early exit if there is any errors 2019-10-15 16:47:16 +07:00
Lzu Tao
02dcd629ae build: switch back to latest official RTIM release 2019-10-15 16:47:11 +07:00
bors
55e7818a06 Auto merge of #4619 - james9909:unused-self, r=flip1995
Add a lint for unused self

changelog: Adds a new lint: `unused_self`

Closes #4550.
2019-10-15 08:16:39 +00:00
James Wang
adf58868e9
Change terminology from static to associated 2019-10-15 09:58:12 +02:00
James Wang
8b50599cb4
Switch to OnlyBodies 2019-10-15 09:58:12 +02:00
James Wang
e23a424b31
Change lint to be pedantic 2019-10-15 09:58:11 +02:00
James Wang
e64b27525b
Remove prints 2019-10-15 09:58:11 +02:00
James Wang
664522badd
Add a new lint for unused self 2019-10-15 09:58:11 +02:00
bors
8fae2dd3c1 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
2019-10-14 17:33:30 +00:00
bors
c40d7db6ed Auto merge of #4663 - lzutao:rustup, r=phansch
Rustup

changelog: none

Suppresses #4662.

r? @phansch
2019-10-14 17:00:46 +00:00
Andre Bogus
cc622608db 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.
2019-10-14 12:09:04 +02:00
Lzu Tao
974a05b806 rustc-dev has been temporarily removed 2019-10-14 10:25:05 +07:00
Lzu Tao
c56784e2b8 Use my RTIM fork 2019-10-14 02:27:46 +07:00
Manish Goregaokar
6693199c0b Bump compiletest 2019-10-14 00:46:39 +07:00
bors
a865d0ad73 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
2019-10-12 06:40:13 +00:00
bors
4d0e897394 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
2019-10-12 06:00:52 +00:00
Lzu Tao
83f04442ec use git version 2019-10-12 10:18:31 +07:00
flip1995
4e7e71b46c
Fix ICE #4579 2019-10-11 12:19:06 +02:00
flip1995
75d951e1ad
Add regression test for ICE #4579 2019-10-11 12:13:37 +02:00
Lzu Tao
dce46325b5 Rustup for rustc-dev 2019-10-11 15:53:55 +07:00
Matthias Seiffert
15b433af48 Use match_function_call wherever possible 2019-10-10 20:06:04 +02:00
Matthias Seiffert
37a2de1562 Move match_function_call to utils 2019-10-10 10:57:12 +02:00
bors
5317efb8b5 Auto merge of #4646 - lzutao:make-pr-guides-visible, r=flip1995
PR template might not be stripped by contributors

cc d97fbdbb42

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

changelog: none
2019-10-10 07:14:41 +00:00
Lzu Tao
871b30266c PR template might not be stripped by contributors 2019-10-10 00:57:57 +07:00
bors
db233b0920 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
2019-10-09 16:09:26 +00:00
bors
0583181d03 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`]
2019-10-09 15:26:33 +00:00
Nikos Filippakis
5143fe1a78 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>
2019-10-09 16:22:00 +02:00
bors
d97fbdbb42 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
2019-10-09 08:56:30 +00:00
bors
1dc7f5c0bc 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`
2019-10-08 16:17:48 +00:00