Commit Graph

6356 Commits

Author SHA1 Message Date
Manish Goregaokar
c47a7e4ef2 get_parent_node_by_hir_id -> get_parent_node 2019-06-25 14:33:51 -07:00
Joe Frikker
8880677b4f Making try_err machine applicable 2019-06-24 21:28:46 -04:00
bors
f0edfab44c Auto merge of #4230 - flip1995:unsugar_if, r=Manishearth
Replace `unsugar_if` function with `is_if` function

cc https://github.com/rust-lang/rust-clippy/pull/4123#discussion_r296581719

changelog: none

r? @Manishearth
2019-06-24 16:27:01 +00:00
flip1995
662037bcf2
Simplify unsugar_if to just an if expr check 2019-06-24 09:51:53 +02:00
flip1995
c192c07930
Remove ast:: prefix from types 2019-06-24 09:40:11 +02:00
bors
8c80b65f10 Auto merge of #4123 - Centril:rustup-let-chains-ast, r=Manishearth
Fix fallout from rust-lang/rust PR 60861

Fixes incoming breakage for unlanded https://github.com/rust-lang/rust/pull/60861.

Tests are passing locally; the Rust PR now needs to land first.

@Manishearth also says we'll want to split out to a `collapsible_if_let` once we have let-chains working in Rust nightly or something.
2019-06-24 05:21:52 +00:00
Mazdak Farrokhzad
46a0e54361 Put 'if let' back into comment. 2019-06-24 07:20:52 +02:00
Mazdak Farrokhzad
0373b007da Pacify rustfmt. 2019-06-24 04:54:23 +02:00
Mazdak Farrokhzad
4434bfac01 Fix dogfood test failures. 2019-06-24 04:00:05 +02:00
Joe Frikker
1e6c6976dd PR comments 2019-06-23 18:02:13 -04:00
Andy Russell
4ce100beb2
don't strip blank lines in lint documentation 2019-06-23 16:21:43 -04:00
Mazdak Farrokhzad
6ef8b57e34 Account for let_chains in collapsible_if ui test cases. 2019-06-23 17:24:45 +02:00
Mazdak Farrokhzad
b918594369 Fix fallout from rust-lang/rust PR 60861. 2019-06-23 17:24:45 +02:00
Joe Frikker
60a80849ce Adding try_err lint 2019-06-22 16:37:05 -04:00
bors
c5d1ecd474 Auto merge of #4220 - d-dorazio:4182-needless-return-void-functions, r=flip1995
make needless_return work with void functions

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

changelog: make needless_return work with void functions.

I don't think the failure is related to my changes, but I'm not sure 🤔
2019-06-22 09:38:53 +00:00
bors
6f82ea53c5 Auto merge of #4227 - lzutao:node-pruning, r=flip1995
Fix fallout cause NodeId pruning

Rustup rust-lang/rust#61984

changelog: none
2019-06-22 08:42:09 +00:00
Lzu Tao
6aea41e050 Fix fallout cause NodeId pruning 2019-06-22 13:41:16 +07:00
Daniele D'Orazio
316a9f2711 cargo fmt 2019-06-21 16:47:34 +02:00
bors
9cae8aa9a9 Auto merge of #4225 - jeremystucki:refactoring, r=flip1995
Remove needless lifetimes

changelog: none
2019-06-21 13:47:13 +00:00
Daniele D'Orazio
66dbc02b05 more idiomatic code 2019-06-21 14:46:34 +02:00
bors
9617f970ac Auto merge of #3919 - matthiaskrgr:readme_3, r=flip1995
readme: update

Remove the crates.io badge from the readme.
Installing clippy via crates.io is deprecated and rustup should be used instead, thus we should not promote crates.io here.

Don't have clippy::correctness" lint category in bold letters, I think it looks a little off.
2019-06-21 12:43:15 +00:00
flip1995
6dc8084788
Remove another unnecessary lifetime 2019-06-21 14:41:52 +02:00
Jeremy Stucki
746fbad98a
Remove needless lifetimes 2019-06-21 14:41:19 +02:00
Daniele D'Orazio
e1a78ae528 update tests and fix lints in clippy 2019-06-21 14:17:59 +02:00
Daniele D'Orazio
6396a7a425 make needless_return work with void functions 2019-06-21 13:58:22 +02:00
bors
5a11ed7b92 Auto merge of #4223 - mikerite:fix-breakage-2019-06-21, r=flip1995
Fix breakage due to rust-lang/rust#61968

<!--
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-21 10:33:53 +00:00
flip1995
ca2ba973a7
Remove unnecssary lifetime from trait_ref_of_method 2019-06-21 12:32:39 +02:00
Michael Wright
837b5208f7 Fix breakage due to rust-lang/rust#61968 2019-06-21 08:14:07 +02:00
Matthias Krüger
e8dfafc7a0 readme: update
Remove the crates.io badge from the readme.
Installing clippy via crates.io is deprecated and rustup should be used instead, thus we should not promote crates.io here.

Don't have the entire clippy::correctness line in bold letters, I think it looks a little off.
2019-06-20 20:17:14 +02:00
bors
7db5d0e6de Auto merge of #4221 - lzutao:redundant-lifetime, r=matthiaskrgr
Fix warnings about unnecessary lifetime bounds

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

changelog: none
2019-06-19 23:19:51 +00:00
Lzu Tao
4fa498a3eb Fix warnings about unnecessary lifetime bounds
Rustup https://github.com/rust-lang/rust/pull/61172
2019-06-20 01:36:23 +07:00
bors
149a988146 Auto merge of #4218 - lzutao:rustup, r=phansch
Rustup

changelog: none
2019-06-19 10:35:28 +00:00
Lzu Tao
5e887b2a6a Fix lifetime mismatch between LateContext and Ty 2019-06-19 17:21:53 +07:00
Lzu Tao
321779979a Fix missing field in ExprKind::Yield
Rustup rust-lang/rust#61941
2019-06-19 16:59:25 +07:00
bors
97f8caabf6 Auto merge of #4210 - dtolnay:division, r=flip1995
Downgrade integer_division to restriction

I believe that this lint falls outside of the scope of opinionated pedantism of the other pedantic lints.

changelog: Downgrade integer_division lint from pedantic to restriction
2019-06-19 07:57:27 +00:00
bors
84cfb71caa Auto merge of #4217 - Manishearth:clog, r=flip1995
Update changelog headings

1.36 is beta now

changelog: none
2019-06-19 07:19:26 +00:00
flip1995
a3f6f842ef
Unify heading style 2019-06-19 09:18:19 +02:00
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