Commit graph

6619 commits

Author SHA1 Message Date
Manish Goregaokar
83e5e8fcd0 Make headings stable 2019-06-18 15:12:18 -07:00
Manish Goregaokar
2d4fc585e1 Update changelog 2019-06-18 15:09:53 -07:00
bors
ec98e53e82 Auto merge of #4216 - phansch:replace_nodeset, r=matthiaskrgr
Refactor: Replace NodeSet with HirIdSet

This saves us one HirId -> NodeId conversion.

changelog: none
2019-06-18 18:38:30 +00:00
Philipp Hansch
ebce573006
Refactor: Replace NodeSet with HirIdSet
This saves us one HirId -> NodeId conversion.
2019-06-18 19:45:01 +02:00
bors
868f168c1c Auto merge of #4215 - matthiaskrgr:rustup_9, r=flip1995
rustup https://github.com/rust-lang/rust/pull/61836/

changelog: none
2019-06-18 10:05:04 +00:00
Matthias Krüger
4d984dc6e6 rustup https://github.com/rust-lang/rust/pull/61836/ 2019-06-18 11:15:47 +02:00
bors
ab085d9aea Auto merge of #4214 - d-dorazio:4204-fix-float-cmp-neq, r=flip1995
fix suggestion for floating point inequality

It should be of the form `(a - b).abs() > error` whereas it was `(a - b).abs() < error` that is instead what should be used for equality.

fixes #4204.

changelog: fix suggestion for floating point inequality
2019-06-17 15:18:31 +00:00
Daniele D'Orazio
be14ea8c37 fix suggestion for floating points inequality
It should be of the form `(a - b).abs() > error` whereas it was
`(a - b).abs() < error` that is instead what should be used for equality.
2019-06-17 16:42:43 +02:00
David Tolnay
f88a387c3f
Downgrade integer_division to restriction 2019-06-15 00:17:04 -07:00
bors
be5d17feb2 Auto merge of #4209 - lzutao:TyCtxt-lifetime, r=Manishearth
Fix wrong lifetime of TyCtxt

Rustup rust-lang/rust#61817

changelog: none
2019-06-14 20:45:56 +00:00
Lzu Tao
9bfdbd13c2 Fix wrong lifetime of TyCtxt 2019-06-14 23:47:48 +07:00
bors
e5a77223f5 Auto merge of #4206 - rust-lang:update_lints, r=phansch
Use replace_region_in_file for creating the lint list

r? @phansch

changelog: none
2019-06-14 12:55:22 +00:00
flip1995
0e480ca4bc
Use replace_region_in_file for creating the lint list 2019-06-14 13:07:33 +02:00
bors
7a95c20c10 Auto merge of #4162 - krk:static-static, r=flip1995
Add lint for statics with explicit static lifetime.

changelog: Add lint for statics with explicit static lifetime, fixes #4138.
2019-06-14 08:47:43 +00:00
flip1995
7e07d1bed8
Restructure rename tests 2019-06-14 10:45:03 +02:00
krk
fefa7e7f67
Register rename to the LintStore. 2019-06-14 10:45:03 +02:00
krk
55740219b0
Rename REDUNDANT_STATIC_LIFETIME to REDUNDANT_STATIC_LIFETIMES. 2019-06-14 10:45:03 +02:00
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