bors
4f8bdf3587
Auto merge of #4231 - jeremystucki:flat-map, r=flip1995
...
Implement flat_map lint
Fixes #4224
changelog: New Lint `flat_map_identity` to detect unnecessary calls to `flat_map`
2019-08-14 09:36:16 +00:00
bors
36f7faee05
Auto merge of #4378 - flip1995:ui-toml, r=flip1995
...
Update ui-toml tests
changelog: none
2019-08-14 08:54:07 +00:00
flip1995
17808c7d00
Update ui-toml tests
2019-08-14 09:58:00 +02:00
Jeremy Stucki
2bfcf89f82
Merge branch 'origin/master' into flat-map
2019-08-14 07:36:37 +02:00
Jeremy Stucki
2fe5e2cea9
Update test
2019-08-13 21:50:52 +02:00
Jeremy Stucki
d578c43c51
Use correct span
2019-08-13 21:50:42 +02:00
Jeremy Stucki
6a263c0816
Add 'unnecessary_flat_map.fixed'
2019-08-13 08:03:04 +02:00
Jeremy Stucki
4275d7b6ac
Run 'update_lints'
2019-08-12 21:47:12 +02:00
Jeremy Stucki
d51136d594
Use 'span_lint_and_sugg'
2019-08-12 21:42:57 +02:00
Jeremy Stucki
3a65e4e75a
Minor refactoring
2019-08-12 21:29:33 +02:00
bors
c154754b74
Auto merge of #4373 - flip1995:filter_changelog_none, r=phansch
...
Filter out PRs with changelog: none
cc #4372
Filtering out the `changelog: none` merge commits, to unclutter the output.
changelog: none
2019-08-12 11:05:49 +00:00
Jeremy Stucki
09e9568c26
Change lint type from 'pedantic' → 'complexity'
2019-08-12 10:53:23 +02:00
flip1995
27ddde561e
Filter out PRs with changelog: none
2019-08-12 09:38:52 +02:00
Jeremy Stucki
6ddf8c36d7
Run 'update_lints'
2019-08-12 07:53:22 +02:00
bors
e255f36afe
Auto merge of #4365 - lukas-code:async_new_ret_no_self, r=flip1995
...
new_ret_no_self: allow Self in inner type for impl Trait return types
Check the inner types of associated types of a trait when checking for Self in the return type of a `new` method. This means that the following will no longer warn:
```rust
trait Trait {
type Inner;
}
struct S;
impl S {
fn new() -> impl Trait<Inner = Option<Self>> {
struct TraitImpl;
impl Trait for TraitImpl {
type Inner = Option<S>;
}
TraitImpl
}
}
```
```rust
#![feature(async_await)]
struct Connection;
impl Connection {
async fn new() -> Result<Self, ()> {
Ok(S)
}
}
```
closes #4359
changelog: fix `new_ret_no_self` lint for async `new` functions.
2019-08-12 05:15:16 +00:00
bors
ed1de3d377
Auto merge of #4367 - flip1995:doc_edition_2018_tests, r=phansch
...
Document how to write tests requiring the 2018 edition
[Rendered](https://github.com/flip1995/rust-clippy/blob/doc_edition_2018_tests/doc/adding_lints.md#Edition-2018-tests )
cc #4365
changelog: none
2019-08-12 04:38:50 +00:00
Jeremy Stucki
df9063013e
Update rustdoc
2019-08-11 22:18:58 +02:00
Jeremy Stucki
5fd7d44f36
Refactor if_chain
...
Co-authored-by: Philipp Krones <hello@philkrones.com>
2019-08-11 21:02:01 +02:00
bors
7a0ac4c25d
Auto merge of #4370 - vallentin:master, r=flip1995
...
Fixed repeated word
changelog: none
2019-08-11 18:42:16 +00:00
Jeremy Stucki
b651f19eb8
Rename 'flat_map' → 'flat_map_identity'
2019-08-11 20:34:25 +02:00
Jeremy Stucki
f0ce04f814
Handle calls with 'std::convert::identity'
2019-08-11 19:51:43 +02:00
Jeremy Stucki
05d9f884e1
Merge branch 'origin/master' into flat-map
2019-08-11 19:22:40 +02:00
Vallentin
b7460ad70b
Fixed repeated word
2019-08-11 12:56:30 +02:00
bors
72da1015d6
Auto merge of #4368 - RalfJung:invalid_ref, r=oli-obk
...
deprecate invalid_ref lint
This fixes the `invalid_ref` lint test to no longer fail when https://github.com/rust-lang/rust/pull/63346/ lands. I also fixed the lint itself, because its wording made no sense: there is no "reference to zeroed/uninitialized memory" here.
changelog: none
2019-08-11 09:08:22 +00:00
Ralf Jung
40fea7a9e0
update_lints
2019-08-11 11:02:25 +02:00
Ralf Jung
2dcce60fdc
deprecate invalid_ref lint
2019-08-11 09:31:55 +02:00
Lukas Markeffsky
d55315808d
fixed tests (again) and added a test that should actually cause a warning for new_ret_no_self
2019-08-09 23:15:49 +02:00
Lukas Markeffsky
54efffcec1
removed unused imports #2
2019-08-09 19:47:25 +02:00
Lukas Markeffsky
1d2c23a2a5
removed unused imports
2019-08-09 19:44:20 +02:00
Lukas Markeffsky
4fbe9f67ee
upgrade test to rust 2018
2019-08-09 19:19:49 +02:00
flip1995
99d1cde8d8
Document how to write tests requiring the 2018 edition
2019-08-09 19:14:59 +02:00
Lukas Markeffsky
d7b9a845aa
new_ret_no_self: walk associated types in impl Trait return types
2019-08-09 17:44:05 +02:00
bors
c55d38ed7a
Auto merge of #4362 - lzutao:expect-on-cstring_as_ptr, r=flip1995
...
Fix lint_cstring_as_ptr for expect
Closes #4312
changelog: none
2019-08-09 09:22:02 +00:00
bors
26a1e532e6
Auto merge of #4361 - lzutao:fix-raw-string-on-single_char_pattern, r=phansch
...
Fix lint_single_char_pattern on raw string literal
Closes #4356
changelog: Handle raw string literal on `single_char_literal` lint.
2019-08-09 07:58:39 +00:00
Lzu Tao
b825cddb6d
Add more tests for raw string literal
2019-08-09 06:22:26 +00:00
bors
764d68749a
Auto merge of #4360 - atouchet:patch-1, r=phansch
...
Fix HTTPS in links
I accidentally missed these in my previous PR.
changelog: none
2019-08-09 06:07:00 +00:00
Lzu Tao
c23a5c586f
Fix lint_cstring_as_ptr for expect
2019-08-09 12:39:33 +07:00
Lzu Tao
30cbdc7491
Fix lint_single_char_pattern on raw string literal
2019-08-09 10:55:30 +07:00
Alex Touchet
b1b2245e28
Fix HTTPS in links
2019-08-08 19:59:22 -07:00
bors
d23e6b396a
Auto merge of #4358 - lzutao:cleanup_implicit_return, r=flip1995
...
Use source_callsite() instead of recursive outer_expn_info()
changelog: none
2019-08-08 16:36:44 +00:00
bors
16e0272d65
Auto merge of #4357 - lzutao:update-pr-template, r=flip1995
...
template: Update how to format source code with ./util/dev
changelog: none
2019-08-08 15:56:09 +00:00
bors
4465e2fbb8
Auto merge of #4355 - lzutao:macro_expn_try_err, r=flip1995
...
Fix macro expansion in try_err lint
Fixes #4309
changelog: none
2019-08-08 15:16:17 +00:00
Lzu Tao
5cad46d15a
template: Update how to format source code with ./util/dev
2019-08-08 21:37:19 +07:00
Lzu Tao
59a35874c1
Use source_callsite() instead of recursive outer_expn_info()
2019-08-08 21:28:40 +07:00
Lzu Tao
90a7b60413
Use snippet_with_macro_callsite suggested by flip1995
2019-08-08 21:21:59 +07:00
Lzu Tao
0487b58f9a
Fix macro expansion in try_err lint
2019-08-08 20:22:52 +07:00
bors
7bd7d40789
Auto merge of #4350 - matthiaskrgr:readme_cargo_fix_clippy, r=phansch
...
README: mention experimental cargo fix clippy support
mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"
[Rendered](https://github.com/matthiaskrgr/rust-clippy/tree/readme_cargo_fix_clippy#auto-applying-clippy-suggestions )
changelog: none
2019-08-07 20:25:08 +00:00
Matthias Krüger
39cdea6df4
Update README.md (fix typo)
...
Co-Authored-By: Philipp Hansch <dev@phansch.net>
2019-08-07 21:07:35 +02:00
Matthias Krüger
8dde4e5806
README: mention that cargo fix has experimental support for applying some clippy lint suggestions via "cargo fix -Z unstable-options --clippy"
2019-08-07 16:27:08 +02:00
bors
e76ef1db03
Auto merge of #4339 - phansch:rustfix_needless_bool, r=flip1995
...
Add run-rustfix for needless_bool lint
This splits up the needless_bool tests into `fixable.rs` and
`simple.rs`. `simple.rs` contains the code that triggers the lint
diagnostic without a suggestion.
changelog: none
cc #3630
2019-08-07 11:00:09 +00:00