Commit Graph

6202 Commits

Author SHA1 Message Date
Kerem
3b1080542b
Remove pub from RedundantStaticLifetime.visit_type function.
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-06-14 10:45:02 +02:00
krk
637e92d44e
Rename const_static_lifetime to redundant_static_lifetime. 2019-06-14 10:45:02 +02:00
krk
b38ce08e76
Merge StaticConst and StaticStatic lints into StaticConst. 2019-06-14 09:41:47 +02:00
krk
87e9dee884
Use RedundantStaticLifetime in StaticStatic. 2019-06-14 09:41:47 +02:00
krk
ff1b533c13
Move type-checking logic in StaticConst to RedundantStaticLifetime. 2019-06-14 09:41:46 +02:00
krk
16bd4796e9
Add lint for statics with explicit static lifetime. 2019-06-14 09:41:46 +02:00
bors
bd39cea01c Auto merge of #4175 - yaahallo:master, r=oli-obk
Implement better help for clippy-driver

https://github.com/rust-lang/rust-clippy/issues/4173
2019-06-13 08:51:53 +00:00
bors
7b2a7a2257 Auto merge of #4201 - mgr-inz-rafal:typos_in_docs, r=matthiaskrgr
Typos and minor grammar corrections

Just some minor grammar issues and typos in documentation.
2019-06-13 05:01:02 +00:00
bors
0814207c43 Auto merge of #4200 - lzutao:tyctxt-lifetime, r=matthiaskrgr
Fix wrong lifetime of TyCtxt

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

changelog: none
2019-06-12 22:54:02 +00:00
Lzu Tao
3832a8d253 Fix wrong lifetime of TyCtxt 2019-06-13 02:49:02 +07:00
Lzu Tao
5d9cd9e120 travis: Wait at most 30 minutes for base test
Sometimes travis gets slow and makes the builds spurious failure because
of no output in 10 minutes. This commit increase Travis timing-out time
at most 30 minutes before terminating the build.
2019-06-13 02:49:02 +07:00
Jane Lusby
2719c1e6a3 minor fix 2019-06-12 12:29:37 -07:00
Jane Lusby
a2bf96f1c6 make it pass dogfood 2019-06-12 12:29:37 -07:00
Jane Lusby
113ae891d9 run rustfmt 2019-06-12 12:29:37 -07:00
Jane Lusby
73259d68db fix padding and put clippy someplaces 2019-06-12 12:29:37 -07:00
Jane Lusby
cfd7e0d5fd show default lint levels 2019-06-12 12:29:37 -07:00
Jane Lusby
07ccec86a5 group printing 2019-06-12 12:29:37 -07:00
Jane Lusby
296794dec5 prelim arg parse 2019-06-12 12:29:37 -07:00
Jane Lusby
5abcff2be5 move Lint static def into its own module 2019-06-12 12:29:37 -07:00
Jane Lusby
f6367c41dc switch to sorted usable lints 2019-06-12 12:29:37 -07:00
Jane Lusby
44b849521e Update clippy_dev/src/main.rs
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-06-12 12:29:37 -07:00
Jane Lusby
cf88c8487a initial commit for help improvements on clippy-driver 2019-06-12 12:29:37 -07:00
mgr-inz-rafal
7ced26d863 Typos and minor grammar corrections 2019-06-12 20:07:10 +02:00
bors
a1eb60f8ea Auto merge of #4195 - thiagoarrais:division-of-integer-literals, r=flip1995
Adds lint for integer division

Hi, folks! This is my first contribution to clippy and my first real piece of Rust code.

This is supposed to add a lint that warns for division of integers (#109). Please let me know if you need any changes.

Fixes #109

changelog: Add lint for integer division
2019-06-12 13:19:26 +00:00
Thiago Arrais
b364eb7b54 Adds lint for integer division 2019-06-12 09:37:14 -03:00
bors
cefddf7843 Auto merge of #4191 - g-bartoszek:redundant-closure-deref, r=flip1995
redundant_closure_for_method_calls fixes

lint does not trigger when there is a difference in mutability
lint does not trigger when the method belongs to a trait which is not implemebted directly (Deref)

<!--
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
2019-06-12 11:56:24 +00:00
Grzegorz
d4ad23bb3f redundant_closure_for_method_calls fixes:
lint does not trigger when there is a difference in mutability
lint does not trigger when the method belongs to a trait which is not implemebted directly (Deref)
2019-06-12 13:43:36 +02:00
bors
bd33a97cc4 Auto merge of #4199 - flip1995:implicit_return_docs, r=flip1995
Fix implicit_return docs

Resolves #4197

changelog: none
2019-06-12 09:58:24 +00:00
bors
f342ea65d4 Auto merge of #4198 - matthiaskrgr:rustup_8, r=flip1995
rustup

changelog: none

cc @lzutao

r? @phansch
2019-06-12 09:29:00 +00:00
flip1995
310c90abb8
Fix implicit_return docs 2019-06-12 10:51:14 +02:00
Matthias Krüger
7c91fb8ded rustup https://github.com/rust-lang/rust/pull/61758/files 2019-06-12 10:28:58 +02:00
Lzu Tao
79e3c7cd55 Remove wrong lifetime from LintContext 2019-06-12 10:28:52 +02:00
bors
ba1702a05f Auto merge of #4190 - projedi:fix-eta, r=flip1995
Fixing eta with respect to lazy evaluation.

This fixes #4187

changelog: `redundant_closure`: stop linting on expressions returning a function, which is then directly used by the closure
2019-06-10 19:03:18 +00:00
Alexander Shabalin
41a4ce52dd Workaround for rust-lang/rustfmt#3615 2019-06-10 20:19:29 +03:00
Alexander Shabalin
86bab94631 Fixing eta with respect to lazy evaluation. 2019-06-10 13:58:40 +03:00
bors
c0dbd34ba9 Auto merge of #4188 - matthiaskrgr:rustup_7, r=Manishearth
rustup https://github.com/rust-lang/rust/pull/61669/

changelog: none
2019-06-09 18:59:35 +00:00
Matthias Krüger
abfdceca18 travis: disable rls integration test. 2019-06-09 20:53:24 +02:00
Matthias Krüger
7d83e13660 rustup https://github.com/rust-lang/rust/pull/61669/ 2019-06-09 15:21:28 +02:00
bors
01ab9fe653 Auto merge of #4185 - mikerite:outer_expn_info, r=Manishearth
Add OUTER_EXPN_INFO lint

changelog: none
2019-06-08 14:00:02 +00:00
Michael Wright
b726b41daf Add OUTER_EXPN_INFO lint 2019-06-08 13:35:04 +02:00
bors
71be6f62fa Auto merge of #4177 - mikerite:compiler_lint_functions_fewer_strings, r=phansch
Remove `to_string()`s from CompilerLintFunctions

changelog: none
2019-06-06 10:25:13 +00:00
bors
5be4e71262 Auto merge of #4136 - euclio:println-writeln-suggestions, r=flip1995
add suggestions for print/write with newline lint

changelog: Add machine-applicable suggestions for `print!`/`write!` with newline lints.
2019-06-06 08:26:48 +00:00
bors
46d7a0d2b8 Auto merge of #4178 - matthiaskrgr:rustup_6, r=oli-obk
rustup https://github.com/rust-lang/rust/pull/57428/

changelog: none
2019-06-06 07:28:10 +00:00
Matthias Krüger
d0ca09883e rustup https://github.com/rust-lang/rust/pull/57428/ 2019-06-06 09:21:19 +02:00
Michael Wright
b36d7a0c61 Remove to_string()s from CompilerLintFunctions 2019-06-06 07:12:12 +02:00
bors
42f96b2558 Auto merge of #4164 - mikerite:fix-4144, r=mikerite
Fix .map(..).unwrap_or_else(..) bad suggestion

Closes #4144
2019-06-04 06:28:23 +00:00
mikerite
3b7d6eeb4f
Fix comment grammar
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2019-06-04 08:27:31 +02:00
bors
20da8f45c6 Auto merge of #4168 - lzutao:fix-script, r=flip1995
Do not install rustup-toolchain if it is in PATH

I find it quiet annoying because I manually build `rustup-toolchain-install-master`
and install it in `PATH` other than in `~/.cargo/bin`. So everytime I run the script,
it always reinstall `rustup-toolchain-install-master` for me.

changelog: none
2019-06-03 09:39:23 +00:00
bors
28a39e9741 Auto merge of #4165 - BO41:needless_range_loop, r=phansch
Add example to needless_range_loop

adds a "could be written as" example

btw, is it correct that the lint triggers even if the index is used not just for getting the values by index?
So that I have to add `.iter().enumerate()` to still get an index?

changelog: none
2019-06-03 08:28:15 +00:00
bors
4b45bd94fe Auto merge of #4163 - lzutao:doc-fix-foo-example, r=phansch
doc: Remove `pub` from trait definition in foo lint example

changelog: none
2019-06-03 07:59:30 +00:00