]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoDecrease line length limit for stderrs
Yuki Okushi [Mon, 3 Feb 2020 06:11:02 +0000 (15:11 +0900)]
Decrease line length limit for stderrs

4 years agoSplit up `indexing_slicing` ui test
Yuki Okushi [Mon, 3 Feb 2020 06:09:17 +0000 (15:09 +0900)]
Split up `indexing_slicing` ui test

4 years agoAuto merge of #5120 - JohnTitor:split-up-drop-forget-ref, r=flip1995
bors [Sun, 2 Feb 2020 18:16:33 +0000 (18:16 +0000)]
Auto merge of #5120 - JohnTitor:split-up-drop-forget-ref, r=flip1995

Split up `drop_forget_ref` ui test

Part of #2038

changelog: none

4 years agoAuto merge of #5119 - JohnTitor:tweak-doc, r=flip1995
bors [Sun, 2 Feb 2020 17:48:12 +0000 (17:48 +0000)]
Auto merge of #5119 - JohnTitor:tweak-doc, r=flip1995

Tweak documentation in `multiple_crate_versions`

This example isn't reproducible now since `ctrlc` upgrades `winapi` to `0.3.x` in `3.1.1`. We should pin their versions to trigger lint correctly.

changelog: none

4 years agoAuto merge of #5123 - JohnTitor:rustup-0202, r=matthiaskrgr
bors [Sat, 1 Feb 2020 22:40:18 +0000 (22:40 +0000)]
Auto merge of #5123 - JohnTitor:rustup-0202, r=matthiaskrgr

Rustup to rust-lang/rust#68133

changelog: none

4 years agoRustup to rust-lang/rust#68133
Yuki Okushi [Sat, 1 Feb 2020 21:56:27 +0000 (06:56 +0900)]
Rustup to rust-lang/rust#68133

4 years agoSplit up `drop_forget_ref` ui test
Yuki Okushi [Sat, 1 Feb 2020 11:28:27 +0000 (20:28 +0900)]
Split up `drop_forget_ref` ui test

4 years agoPin versions to trigger lint correctly
Yuki Okushi [Sat, 1 Feb 2020 11:11:32 +0000 (20:11 +0900)]
Pin versions to trigger lint correctly

4 years agoAuto merge of #5116 - matthiaskrgr:rustup_29, r=flip1995
bors [Fri, 31 Jan 2020 20:35:22 +0000 (20:35 +0000)]
Auto merge of #5116 - matthiaskrgr:rustup_29, r=flip1995

update test stderr

changelog: none

4 years agoupdate test stderr
Matthias Krüger [Fri, 31 Jan 2020 19:21:10 +0000 (20:21 +0100)]
update test stderr

4 years agoAuto merge of #5106 - flip1995:dbg_assert_mut_async, r=oli-obk
bors [Fri, 31 Jan 2020 17:05:35 +0000 (17:05 +0000)]
Auto merge of #5106 - flip1995:dbg_assert_mut_async, r=oli-obk

Don't trigger [debug_assert_with_mut_call] on debug_assert!(_.await)

Fixes #5105

cc #5112

changelog: Don't trigger [`debug_assert_with_mut_call`] on `debug_assert!(_.await)` and move it to nursery.

4 years agoMove debug_assertions_with_mut_call to nursery
flip1995 [Fri, 31 Jan 2020 09:42:31 +0000 (10:42 +0100)]
Move debug_assertions_with_mut_call to nursery

4 years agoAdd test for `await` in `debug_assert!(..)`
flip1995 [Wed, 29 Jan 2020 14:47:22 +0000 (15:47 +0100)]
Add test for `await` in `debug_assert!(..)`

4 years agoDon't trigger `debug_assert_with_mut_call` on `.await`
flip1995 [Wed, 29 Jan 2020 14:46:38 +0000 (15:46 +0100)]
Don't trigger `debug_assert_with_mut_call` on `.await`

4 years agoSmall refactor of mutable_debug_assertions
flip1995 [Wed, 29 Jan 2020 14:45:42 +0000 (15:45 +0100)]
Small refactor of mutable_debug_assertions

4 years agoAuto merge of #5111 - flip1995:changelog, r=phansch
bors [Fri, 31 Jan 2020 07:53:37 +0000 (07:53 +0000)]
Auto merge of #5111 - flip1995:changelog, r=phansch

Update changelog

[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)

r? @phansch

changelog: none

4 years agoAuto merge of #5109 - phansch:ciao_util_dev, r=flip1995
bors [Fri, 31 Jan 2020 07:18:06 +0000 (07:18 +0000)]
Auto merge of #5109 - phansch:ciao_util_dev, r=flip1995

Deprecate util/dev in favor of cargo alias

This means one less shell script and a bit more cross-platform support
for contributors.

If you've been using `./util/dev` before, this now becomes `cargo dev`.

The key part of this change is found in `.cargo/config` where an alias for calling the `clippy_dev` binary is defined.

changelog: none

4 years agoMark clippy_project_root as `must_use`
Phil Hansch [Fri, 31 Jan 2020 06:32:53 +0000 (07:32 +0100)]
Mark clippy_project_root as `must_use`

Co-Authored-By: Philipp Krones <hello@philkrones.com>
4 years agoReplace one more copy-pasted clippy_project_root fn
Philipp Hansch [Fri, 31 Jan 2020 06:30:44 +0000 (07:30 +0100)]
Replace one more copy-pasted clippy_project_root fn

4 years agoAuto merge of #5110 - Aloso:patch-1, r=flip1995
bors [Thu, 30 Jan 2020 23:24:53 +0000 (23:24 +0000)]
Auto merge of #5110 - Aloso:patch-1, r=flip1995

Fix syntax highlighting of code fences

The documentation for RESULT_EXPECT_USED includes this code:

    let res: Result<usize, ()> = Ok(1);
    res?;
    # Ok::<(), ()>(())

Because the code fence didn't start with `rust`, the code wasn't highlighted and the line starting with `#` was displayed on the website. This is now fixed.

EDIT: I noticed that highlighting for some other lints is broken as well. It only works if the code fence looks like this:

````markdown
```rust
// ..
```
````

However, many code blocks were ignored. I un-ignored most code blocks and made them compile by adding hidden code with `#`. While doing so, I found two mistakes:

```rust
opt.map_or(None, |a| a + 1)
// instead of
opt.map_or(None, |a| Some(a + 1))
```
and

```rust
fn as_str(self) -> &str
// instead of
fn as_str(self) -> &'static str
```

changelog: none

4 years agoUn-ignore most code blocks to render correctly on website, correct mistakes
Ludwig Stecher [Thu, 30 Jan 2020 22:44:37 +0000 (23:44 +0100)]
Un-ignore most code blocks to render correctly on website, correct mistakes

4 years agoUpdate changelog
flip1995 [Thu, 30 Jan 2020 22:26:25 +0000 (23:26 +0100)]
Update changelog

4 years agoFix code formatting for more lints
Ludwig Stecher [Thu, 30 Jan 2020 21:12:00 +0000 (22:12 +0100)]
Fix code formatting for more lints

4 years agoAuto merge of #5108 - JohnTitor:split-up-0130, r=flip1995
bors [Thu, 30 Jan 2020 21:06:47 +0000 (21:06 +0000)]
Auto merge of #5108 - JohnTitor:split-up-0130, r=flip1995

Split up `match` ui test

Part of #2038

Also, this decreases the line length limit to 220.

changelog: none

4 years agoFix syntax highlighting of code fence
Ludwig Stecher [Thu, 30 Jan 2020 20:55:30 +0000 (21:55 +0100)]
Fix syntax highlighting of code fence

The documentation for RESULT_EXPECT_USED includes this code:

    let res: Result<usize, ()> = Ok(1);
    res?;
    # Ok::<(), ()>(())

Because the code fence didn't start with `rust`, the code wasn't highlighted and the line starting with `#` was displayed on the website. This is now fixed.

4 years agoMove project_root function to clippy_dev/src/lib.rs
Philipp Hansch [Thu, 30 Jan 2020 20:29:21 +0000 (21:29 +0100)]
Move project_root function to clippy_dev/src/lib.rs

This allows us to use the method in both `fmt.rs` and `lib.rs` in
multiple places. The downside is that we panic inside the method now,
instead of using the error handling in `fmt.rs`. We may want to
centralize the error handling for clippy_dev at some point, though.

4 years agoDeprecate util/dev in favor of cargo alias
Philipp Hansch [Thu, 30 Jan 2020 07:33:48 +0000 (08:33 +0100)]
Deprecate util/dev in favor of cargo alias

If you've been using `./util/dev` before, this now becomes `cargo dev`.

The key part of this change is found in `.cargo/config`.

This means one less shell script and a bit more cross-platform support
for contributors.

4 years agoAuto merge of #5101 - Areredify:let_underscore_lock, r=flip1995
bors [Thu, 30 Jan 2020 20:24:24 +0000 (20:24 +0000)]
Auto merge of #5101 - Areredify:let_underscore_lock, r=flip1995

add `let_underscore_lock` lint

closes #1574
changelog: add `let_underscore_lock` lint

I am not entirely sure about my docs/messages wording here, improvements are welcome

4 years agoAuto merge of #5107 - JohnTitor:revive-test, r=flip1995
bors [Thu, 30 Jan 2020 19:49:05 +0000 (19:49 +0000)]
Auto merge of #5107 - JohnTitor:revive-test, r=flip1995

Revive test in `enum_clike_unportable_variant`

Revive one test since mentioned ICE has been resolved.

changelog: none

4 years agolint all guard types, not just lock functions
Areredify [Thu, 30 Jan 2020 15:10:19 +0000 (18:10 +0300)]
lint all guard types, not just lock functions

4 years agodecouple 'let_underscore' tests
Mikhail Babenko [Tue, 28 Jan 2020 09:28:11 +0000 (12:28 +0300)]
decouple 'let_underscore' tests

4 years agoadd lint
Mikhail Babenko [Mon, 27 Jan 2020 14:34:30 +0000 (17:34 +0300)]
add  lint

4 years agoDecrease line length limit for stderr files
Yuki Okushi [Thu, 30 Jan 2020 03:08:38 +0000 (12:08 +0900)]
Decrease line length limit for stderr files

4 years agoSplit up `match` ui test
Yuki Okushi [Thu, 30 Jan 2020 03:06:42 +0000 (12:06 +0900)]
Split up `match` ui test

4 years agoRevive test in `enum_clike_unportable_variant`
Yuki Okushi [Thu, 30 Jan 2020 02:43:19 +0000 (11:43 +0900)]
Revive test in `enum_clike_unportable_variant`

4 years agoAuto merge of #5058 - xiongmao86:issue4903, r=flip1995
bors [Wed, 29 Jan 2020 16:29:05 +0000 (16:29 +0000)]
Auto merge of #5058 - xiongmao86:issue4903, r=flip1995

Closes Issue4903

fixes #4903.

Check list:
- [x] Followed [lint naming conventions][lint_naming]
- [x] Added passing UI tests (including committed `.stderr` file)
- [x] `cargo test` passes locally
- [x] Executed `./util/dev update_lints`
- [x] Added lint documentation
- [x] Run `./util/dev fmt`

[lint_naming]: https://rust-lang.github.io/rfcs/0344-conventions-galore.html#lints
---

changelog: implement lint that warn about single component path imports(`use ident;`).

4 years agoReformat code.
xiongmao86 [Wed, 29 Jan 2020 16:23:47 +0000 (00:23 +0800)]
Reformat code.

4 years agoAdd test and update reference.
xiongmao86 [Wed, 29 Jan 2020 16:22:42 +0000 (00:22 +0800)]
Add test and update reference.

4 years agoDeclare lint and implement lint logic.
xiongmao86 [Wed, 29 Jan 2020 16:21:29 +0000 (00:21 +0800)]
Declare lint and implement lint logic.

4 years agoAuto merge of #5104 - JohnTitor:rustup-0129, r=Manishearth
bors [Wed, 29 Jan 2020 08:31:51 +0000 (08:31 +0000)]
Auto merge of #5104 - JohnTitor:rustup-0129, r=Manishearth

Rustup to rust-lang/rust#68512

changelog: none

4 years agoRustup to rust-lang/rust#68512
Yuki Okushi [Wed, 29 Jan 2020 08:15:56 +0000 (17:15 +0900)]
Rustup to rust-lang/rust#68512

4 years agoAuto merge of #5099 - JohnTitor:split-up-non-copy-const, r=flip1995
bors [Mon, 27 Jan 2020 11:09:45 +0000 (11:09 +0000)]
Auto merge of #5099 - JohnTitor:split-up-non-copy-const, r=flip1995

Split up `non_copy_const` ui test

Part of #2038
Maybe there is a better way to avoid duplications of constants.

changelog: none

4 years agoAuto merge of #5098 - JohnTitor:rename-span-lints, r=flip1995
bors [Mon, 27 Jan 2020 10:37:17 +0000 (10:37 +0000)]
Auto merge of #5098 - JohnTitor:rename-span-lints, r=flip1995

Rename `span_{help, note}_and_lint` to `span_lint_and_*`

`span_*_and_lint` and `span_lint_and_*` make us confused. The order should be the same.

[context](https://github.com/rust-lang/rust-clippy/pull/5084#issuecomment-578411309)

changelog: none

4 years agoSplit up `non_copy_const` ui test
Yuki Okushi [Mon, 27 Jan 2020 03:14:11 +0000 (12:14 +0900)]
Split up `non_copy_const` ui test

4 years agoRename `span_note_and_lint` to `span_lint_and_note`
Yuki Okushi [Mon, 27 Jan 2020 02:26:42 +0000 (11:26 +0900)]
Rename `span_note_and_lint` to `span_lint_and_note`

4 years agoRename `span_help_and_lint` to `span_lint_and_help`
Yuki Okushi [Mon, 27 Jan 2020 01:56:22 +0000 (10:56 +0900)]
Rename `span_help_and_lint` to `span_lint_and_help`

4 years agoAuto merge of #5084 - JohnTitor:clean-up-span-lint, r=flip1995
bors [Sun, 26 Jan 2020 15:28:39 +0000 (15:28 +0000)]
Auto merge of #5084 - JohnTitor:clean-up-span-lint, r=flip1995

Clean up `span_lint` in `methods/mod.rs`

Uses `span_help_and_lint` instead of `span_lint` and `span_lint_and_sugg` instead of `span_lint_and_then`.

changelog: none

4 years agoAuto merge of #5097 - phansch:remove_fixme, r=llogiq
bors [Sun, 26 Jan 2020 10:50:47 +0000 (10:50 +0000)]
Auto merge of #5097 - phansch:remove_fixme, r=llogiq

Resolve FIXME: String::new is now a const fn

`const_string_new` is stable since Rust 1.39

changelog: none

4 years agoResolve FIXME: String::new is now a const fn
Philipp Hansch [Sun, 26 Jan 2020 10:03:53 +0000 (11:03 +0100)]
Resolve FIXME: String::new is now a const fn

`const_string_new` is stable since Rust 1.39

4 years agoAuto merge of #5096 - eddyb:mac-name, r=oli-obk
bors [Sun, 26 Jan 2020 07:42:55 +0000 (07:42 +0000)]
Auto merge of #5096 - eddyb:mac-name, r=oli-obk

Don't use ExpnKind::descr to get the name of a bang macro.

This is the same change as the first commit in rust-lang/rust#68407, but applied to clippy.
The new code should work both before and after the changes in rust-lang/rust#68407.

changelog: none

4 years agoDon't use ExpnKind::descr to get the name of a bang macro.
Eduard-Mihai Burtescu [Sun, 26 Jan 2020 01:12:44 +0000 (03:12 +0200)]
Don't use ExpnKind::descr to get the name of a bang macro.

4 years agoApply review comments
Yuki Okushi [Sat, 25 Jan 2020 22:01:16 +0000 (07:01 +0900)]
Apply review comments

4 years agoAuto merge of #5083 - Areredify:issue-4399, r=flip1995
bors [Sat, 25 Jan 2020 17:47:54 +0000 (17:47 +0000)]
Auto merge of #5083 - Areredify:issue-4399, r=flip1995

dont fire `possible_missing_comma` if intendation is present

Closes #4399
changelog: dont fire `possible_missing_comma` if intendation is present

I suspect there is already a utils function for indentation (but searching indent didn't yield a function for that), and my solution is certainly not universal, but it's probably the best we can do.

4 years agodont fire possible_missing_comma if intendation is present
Mikhail Babenko [Thu, 23 Jan 2020 21:27:01 +0000 (00:27 +0300)]
dont fire possible_missing_comma if intendation is present

4 years agoAuto merge of #5081 - Areredify:vec_box_threshold, r=flip1995
bors [Sat, 25 Jan 2020 16:11:43 +0000 (16:11 +0000)]
Auto merge of #5081 - Areredify:vec_box_threshold, r=flip1995

add size parameter for `vec_box`  lint

changelog: add size threshold for the `vec_box` lint, currently 4096 bytes (one page) (subject to change). Closes #3547.

diff is a little bit confusing due to some refactoring (moving free functions to lint struct functions), relevant portion is [this](https://github.com/rust-lang/rust-clippy/compare/master...Areredify:vec_box_threshold?expand=1#diff-1096120ca9143af89dcc9175ea92b54aR294-R298). In hindsight should've been different commits, but oh well.

4 years agoadd size parameter for lint
Mikhail Babenko [Thu, 23 Jan 2020 14:52:41 +0000 (17:52 +0300)]
add size parameter for  lint

4 years agoAuto merge of #5090 - JohnTitor:split-up-match-same-arms, r=phansch
bors [Sat, 25 Jan 2020 07:28:31 +0000 (07:28 +0000)]
Auto merge of #5090 - JohnTitor:split-up-match-same-arms, r=phansch

Split up `match_same_arms` ui test

Part of #2038

changelog: none

4 years agoSplit up `match_same_arms` ui test
Yuki Okushi [Sat, 25 Jan 2020 05:25:45 +0000 (14:25 +0900)]
Split up `match_same_arms` ui test

4 years agoAuto merge of #5087 - Areredify:issue-4905, r=phansch
bors [Fri, 24 Jan 2020 22:30:07 +0000 (22:30 +0000)]
Auto merge of #5087 - Areredify:issue-4905, r=phansch

improve `empty_enum` documentation

closes #4905
changelog: improve `empty_enum` help message and documentation.

4 years agoAuto merge of #5086 - Areredify:issue-3746, r=phansch
bors [Fri, 24 Jan 2020 21:42:46 +0000 (21:42 +0000)]
Auto merge of #5086 - Areredify:issue-3746, r=phansch

don't fire `empty_loop` in `no_std` crates

closes #3746.
changelog: move no_std detection to utils, don't fire empty_loop in no_std crates

4 years agoAuto merge of #5085 - JohnTitor:split-up-test, r=phansch
bors [Fri, 24 Jan 2020 21:10:10 +0000 (21:10 +0000)]
Auto merge of #5085 - JohnTitor:split-up-test, r=phansch

Split up `needless_range_loop` ui test

Part of #2038

changelog: none

4 years agodon't fire empty_loop in no_std crates
Mikhail Babenko [Fri, 24 Jan 2020 10:50:03 +0000 (13:50 +0300)]
don't fire empty_loop in no_std crates

4 years agoimprove empty_enum documentation
Mikhail Babenko [Fri, 24 Jan 2020 11:37:16 +0000 (14:37 +0300)]
improve empty_enum documentation

4 years agoSplit up `needless_range_loop` ui test
Yuki Okushi [Fri, 24 Jan 2020 08:21:50 +0000 (17:21 +0900)]
Split up `needless_range_loop` ui test

4 years agoUpdate stderrs
Yuki Okushi [Fri, 24 Jan 2020 08:04:46 +0000 (17:04 +0900)]
Update stderrs

4 years agoClean up `methods/mod.rs`
Yuki Okushi [Fri, 24 Jan 2020 08:04:37 +0000 (17:04 +0900)]
Clean up `methods/mod.rs`

4 years agoAuto merge of #5027 - sinkuu:vectored_io, r=phansch
bors [Fri, 24 Jan 2020 06:44:09 +0000 (06:44 +0000)]
Auto merge of #5027 - sinkuu:vectored_io, r=phansch

Lint vectored IO in unused_io_amount lint

`read_vectored` & `write_vectored` require handling returned value likewise non-vectored methods. https://github.com/rust-lang/rust/issues/68041

---

changelog: lint vectored IO in `unused_io_amount` lint

4 years agoAuto merge of #5082 - Areredify:issue-4980, r=flip1995
bors [Thu, 23 Jan 2020 18:29:28 +0000 (18:29 +0000)]
Auto merge of #5082 - Areredify:issue-4980, r=flip1995

disable let_underscore_must_use in external macros

changelog: disable let_underscore_must_use in external macros
Closes #4980

4 years agodisable let_underscore_must_use in external macros
Mikhail Babenko [Thu, 23 Jan 2020 15:20:50 +0000 (18:20 +0300)]
disable let_underscore_must_use in external macros

4 years agoAuto merge of #4945 - Areredify:as_deref, r=flip1995
bors [Thu, 23 Jan 2020 16:56:48 +0000 (16:56 +0000)]
Auto merge of #4945 - Areredify:as_deref, r=flip1995

add `option_as_ref_deref` lint

changelog: add a new lint that lints `option.as_ref().map(Deref::deref)` (and similar calls), which could be expressed more succinctly as `option.as_deref[_mut]()`. Closes #4918.

4 years agoadd `option_as_ref_deref` lint
Areredify [Mon, 23 Dec 2019 04:48:15 +0000 (07:48 +0300)]
add `option_as_ref_deref` lint

4 years agoAuto merge of #5079 - JohnTitor:fix-eq-op, r=flip1995
bors [Wed, 22 Jan 2020 11:36:04 +0000 (11:36 +0000)]
Auto merge of #5079 - JohnTitor:fix-eq-op, r=flip1995

Ignore macros with `!` operators in `eq_op`

`SpanlessEq::eq_expr` doesn't ignore macros with `!` operators and I'm not sure we should ignore there, so I ignore in `eq_op` (and `op_ref`).

Fixes #5077

changelog: Fix false positive in `eq_op`

4 years agoIgnore macros with `!` operators in `eq_op`
Yuki Okushi [Wed, 22 Jan 2020 07:48:00 +0000 (16:48 +0900)]
Ignore macros with `!` operators in `eq_op`

4 years agoAuto merge of #5075 - JohnTitor:rustup-0122, r=flip1995
bors [Tue, 21 Jan 2020 22:35:15 +0000 (22:35 +0000)]
Auto merge of #5075 - JohnTitor:rustup-0122, r=flip1995

Rustup to rust-lang/rust#68140

changelog: none

4 years agoRustup to rust-lang/rust#68140
Yuki Okushi [Tue, 21 Jan 2020 22:26:07 +0000 (07:26 +0900)]
Rustup to rust-lang/rust#68140

4 years agoAuto merge of #5068 - JohnTitor:split-up-transmute, r=phansch
bors [Tue, 21 Jan 2020 06:22:05 +0000 (06:22 +0000)]
Auto merge of #5068 - JohnTitor:split-up-transmute, r=phansch

Split up `transmute` ui test

Part of #2038

changelog: none

4 years agoAuto merge of #5028 - krishna-veerareddy:issue-5026-mem-ordering-fences, r=phansch
bors [Tue, 21 Jan 2020 05:53:46 +0000 (05:53 +0000)]
Auto merge of #5028 - krishna-veerareddy:issue-5026-mem-ordering-fences, r=phansch

Detect usage of invalid atomic ordering in memory fences

Detect usage of `core::sync::atomic::{fence, compiler_fence}` with `Ordering::Relaxed` and suggest valid alternatives.

changelog: Extend `invalid_atomic_ordering` to lint memory fences

Fixes #5026

4 years agoDecrease line length limit for stderr files
Yuki Okushi [Mon, 20 Jan 2020 21:43:01 +0000 (06:43 +0900)]
Decrease line length limit for stderr files

4 years agoAuto merge of #5067 - JohnTitor:lint-skip-while-next, r=flip1995
bors [Mon, 20 Jan 2020 17:28:38 +0000 (17:28 +0000)]
Auto merge of #5067 - JohnTitor:lint-skip-while-next, r=flip1995

Add `skip_while_next` lint

Fixes #4036

changelog: Add `skip_while_next` lint

4 years agoAuto merge of #5070 - JohnTitor:suspicious-map-doc, r=flip1995
bors [Mon, 20 Jan 2020 12:12:03 +0000 (12:12 +0000)]
Auto merge of #5070 - JohnTitor:suspicious-map-doc, r=flip1995

Improve `suspicious_map`documentation

Fixes #4793

changelog: none

4 years agoApply review comment
Yuki Okushi [Mon, 20 Jan 2020 12:07:31 +0000 (21:07 +0900)]
Apply review comment

4 years agoAuto merge of #5069 - JohnTitor:tweak-wording, r=flip1995
bors [Mon, 20 Jan 2020 11:42:08 +0000 (11:42 +0000)]
Auto merge of #5069 - JohnTitor:tweak-wording, r=flip1995

Tweak wording in `assertions_on_constants`

Displays actual macro names

changelog: none

4 years agoImprove `suspicious_map`documentation
Yuki Okushi [Mon, 20 Jan 2020 06:05:40 +0000 (15:05 +0900)]
Improve `suspicious_map`documentation

4 years agoTweak wording in `assertions_on_constants`
Yuki Okushi [Mon, 20 Jan 2020 02:52:58 +0000 (11:52 +0900)]
Tweak wording in `assertions_on_constants`

4 years agoSplit up `transmute` ui test
Yuki Okushi [Mon, 20 Jan 2020 02:16:50 +0000 (11:16 +0900)]
Split up `transmute` ui test

4 years agoRemove trailing whitespaces
Yuki Okushi [Mon, 20 Jan 2020 01:55:23 +0000 (10:55 +0900)]
Remove trailing whitespaces

4 years agoAdd `skip_while_next` lint
Yuki Okushi [Mon, 20 Jan 2020 01:54:54 +0000 (10:54 +0900)]
Add `skip_while_next` lint

4 years agoAuto merge of #5056 - rust-lang:dissasociate-mut-key, r=flip1995
bors [Sun, 19 Jan 2020 14:41:28 +0000 (14:41 +0000)]
Auto merge of #5056 - rust-lang:dissasociate-mut-key, r=flip1995

Avoid mut_key on types of unknown layout

This fixes #5020 by requiring a known layout for the key type before linting. Edit: This fixes #5043, too.

changelog: none

4 years agoAvoid mut_key on types of unknown layout
Andre Bogus [Thu, 16 Jan 2020 23:18:37 +0000 (00:18 +0100)]
Avoid mut_key on types of unknown layout

4 years agoAuto merge of #5032 - JohnTitor:add-sugg-some-result, r=flip1995
bors [Sun, 19 Jan 2020 12:27:35 +0000 (12:27 +0000)]
Auto merge of #5032 - JohnTitor:add-sugg-some-result, r=flip1995

Add suggestions for `if_let_some_result`

Fixes #4991

This approach may be fragile though...

changelog: Add suggestions for `if_let_some_result`

4 years agoTreat more strange pattern
Yuki Okushi [Sun, 19 Jan 2020 12:14:47 +0000 (21:14 +0900)]
Treat more strange pattern

4 years agoAuto merge of #5066 - JohnTitor:split-up-1447, r=llogiq
bors [Sun, 19 Jan 2020 07:49:48 +0000 (07:49 +0000)]
Auto merge of #5066 - JohnTitor:split-up-1447, r=llogiq

Split up `if_same_then_else` ui test

Part of #2038

changelog: none

4 years agoSplit up `if_same_then_else` ui test
Yuki Okushi [Sun, 19 Jan 2020 06:04:41 +0000 (15:04 +0900)]
Split up `if_same_then_else` ui test

4 years agoApply review comments
Yuki Okushi [Sun, 19 Jan 2020 01:00:34 +0000 (10:00 +0900)]
Apply review comments

4 years agoRun `update_lints`
Yuki Okushi [Fri, 10 Jan 2020 21:02:02 +0000 (06:02 +0900)]
Run `update_lints`

4 years agoReduce span range
Yuki Okushi [Fri, 10 Jan 2020 19:34:01 +0000 (04:34 +0900)]
Reduce span range

4 years agoRename `ok_if_let` to `if_let_some_result`
Yuki Okushi [Fri, 10 Jan 2020 18:29:55 +0000 (03:29 +0900)]
Rename `ok_if_let` to `if_let_some_result`

4 years agoApply review comments
Yuki Okushi [Fri, 10 Jan 2020 18:05:10 +0000 (03:05 +0900)]
Apply review comments

4 years agoAdd suggestion in `if_let_some_result`
Yuki Okushi [Thu, 9 Jan 2020 23:34:13 +0000 (08:34 +0900)]
Add suggestion in `if_let_some_result`

4 years agoAuto merge of #5065 - matthiaskrgr:rustup_28, r=matthiaskrgr
bors [Sat, 18 Jan 2020 22:44:46 +0000 (22:44 +0000)]
Auto merge of #5065 - matthiaskrgr:rustup_28, r=matthiaskrgr

rustup https://github.com/rust-lang/rust/pull/67712

slice_patterns have been stabilized.

changelog: none