Yuki Okushi
fdda3c3f25
Tweak wording in assertions_on_constants
2020-01-20 11:52:58 +09:00
Yuki Okushi
67d0f443b3
Split up transmute
ui test
2020-01-20 11:16:50 +09:00
Yuki Okushi
84e4bc54e0
Remove trailing whitespaces
2020-01-20 10:56:02 +09:00
Yuki Okushi
95c369fa91
Add skip_while_next
lint
2020-01-20 10:56:02 +09:00
bors
f7b3e4f29c
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
2020-01-19 14:41:28 +00:00
Andre Bogus
59fd637ba1
Avoid mut_key on types of unknown layout
2020-01-19 14:49:18 +01:00
bors
fd0428f622
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`
2020-01-19 12:27:35 +00:00
Yuki Okushi
c9f8d03f42
Treat more strange pattern
2020-01-19 21:14:47 +09:00
bors
f728bcd431
Auto merge of #5066 - JohnTitor:split-up-1447, r=llogiq
...
Split up `if_same_then_else` ui test
Part of #2038
changelog: none
2020-01-19 07:49:48 +00:00
Yuki Okushi
dfab83fe11
Split up if_same_then_else
ui test
2020-01-19 15:04:41 +09:00
Yuki Okushi
7e76a19664
Apply review comments
2020-01-19 10:14:03 +09:00
Yuki Okushi
ce06ba3d30
Run update_lints
2020-01-19 10:06:08 +09:00
Yuki Okushi
aab64a21cc
Reduce span range
2020-01-19 10:06:08 +09:00
Yuki Okushi
ae872fe1c7
Rename ok_if_let
to if_let_some_result
2020-01-19 10:06:08 +09:00
Yuki Okushi
9e55424bdc
Apply review comments
2020-01-19 10:06:08 +09:00
Yuki Okushi
9035264a8f
Add suggestion in if_let_some_result
2020-01-19 10:06:08 +09:00
bors
0a7003ecf0
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
2020-01-18 22:44:46 +00:00
Matthias Krüger
b2c4f09d77
rustup https://github.com/rust-lang/rust/pull/67712
...
slice_patterns have been stabilized.
2020-01-18 23:43:28 +01:00
bors
0964b8d192
Auto merge of #5046 - JohnTitor:order-nonminimal-bool, r=flip1995
...
Keep the ordering in `nonminimal_bool` lint
I believe it shouldn't cause any regression but feel free to let me know if you have a doubtful example.
Also, splits up `booleans` ui test.
Fixes #5045
changelog: none
2020-01-18 19:51:46 +00:00
bors
ee06aa990f
Auto merge of #5063 - JohnTitor:allow-correctly, r=flip1995
...
Allow `unused_self` lint at the function level
Another approach of #5062 .
Fixes #5053
changelog: Allow `unused_self` lint at the function level
2020-01-18 16:58:30 +00:00
Yuki Okushi
ff0a22d99f
Allow unused_self
lint at the function level
2020-01-18 21:05:42 +09:00
bors
7ae24429ab
Auto merge of #5057 - rust-lang:pedantic_range_plus_one, r=flip1995
...
Downgrade range_plus_one to pedantic
This fixes #2217
changelog: Downgrade [`range_plus_one`] to `pedantic`
2020-01-18 10:23:46 +00:00
Andre Bogus
ff5fb19bbd
Downgrade range_plus_one to pedantic
2020-01-18 09:40:36 +01:00
bors
e36a33fac7
Auto merge of #5059 - JohnTitor:rustup-0118, r=llogiq
...
Rustup to rust-lang/rust#68204
changelog: none
2020-01-18 08:10:56 +00:00
Yuki Okushi
e72f0e61c6
Rustup to rust-lang/rust#68204
2020-01-18 14:39:18 +09:00
bors
6bd0580887
Auto merge of #5055 - krishna-veerareddy:fix-new-lint-generator-import, r=llogiq
...
Fix new lint generator import
Fix `rustc_lint` import path and add lifetimes to `LateLintPass` in `new_lint` command.
changelog: none
2020-01-16 19:43:22 +00:00
Krishna Sai Veera Reddy
9ebac161e4
Add lifetimes to LateLintPass
2020-01-16 10:05:29 -08:00
Krishna Sai Veera Reddy
2d352f42cc
Fix rustc lint import paths generated by new_lint
2020-01-16 09:44:45 -08:00
bors
8b72b7251c
Auto merge of #4994 - bradsherman:new_lint_gen, r=flip1995
...
Autogenerate new lints
Add option in clippy_dev to automatically generate boilerplate code for adding new lints
example:
`./util/dev new_lint --name=iter_nth_zero --type=late`
Fixes #4942
changelog: none
2020-01-16 16:24:41 +00:00
bors
a8d90f6a57
Auto merge of #5054 - flip1995:rustup, r=flip1995
...
Update custom_ice_message.stderr
changelog: none
2020-01-16 15:04:45 +00:00
flip1995
3c68d892ff
Update custom_ice_message.stderr
2020-01-16 16:01:36 +01:00
Brad Sherman
32337a9b58
Add lint for default lint description
...
- Lint for any new lints that have the default lint description
from the automation
2020-01-15 21:23:08 -06:00
Brad Sherman
237a01d116
Update documentation for adding new lints
...
- Add instructions for adding new lints with
the new automation
2020-01-15 21:20:51 -06:00
Brad Sherman
ea82cbe790
Generate new lints easily
...
- Add option in clippy_dev to automatically generate boilerplate
code for adding new lints
2020-01-15 21:20:50 -06:00
bors
be09bb47db
Auto merge of #5034 - ThibsG:MatchWildErrArmImprove5024, r=flip1995
...
Match wild err arm improvements
This lint should trigger on other identifiers which have `_` prefix (such as `_e`) and only if they are unused in the panic block.
_Note_: the `is_unused` function is greatly inspired from `pat_is_wild` function in [loops lints](43ac9416d9/clippy_lints/src/loops.rs (L1689)
).
I've been considering doing some refactoring, maybe in utils. Maybe this PR or a new one. What do you think ?
fixes #5024
changelog: none
2020-01-15 21:17:21 +00:00
bors
d13b678e37
Auto merge of #5048 - justjavac:patch-1, r=llogiq
...
update license year to 2020
Happy new year 2020
changelog: none
2020-01-15 07:35:30 +00:00
迷渡
aba3386436
update license year to 2020
2020-01-15 15:00:54 +08:00
bors
5ab50d20a6
Auto merge of #5023 - rust-lang:doc-main, r=phansch
...
Omit doc safety/errors header checking for main
This omits checking `main` methods, which are not usually documented in the way the others are.
changelog: none
2020-01-14 21:21:58 +00:00
Andre Bogus
2797b64f7e
Omit doc safety/errors header checking for main
2020-01-14 18:20:56 +01:00
Yuki Okushi
3885033e5f
Split up booleans
ui test
2020-01-14 08:32:33 +09:00
bors
c24a42289b
Auto merge of #4543 - xiongmao86:issue4503, r=flip1995
...
Fix issue4503
Fixes #4503 .
changelog: Add a lint checking user are using FileType.is_file() method and suggest using !FileType.is_dir().
- [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`
2020-01-13 22:09:39 +00:00
Yuki Okushi
73e525019d
Fix the ordering on nonminimal_bool
2020-01-14 07:08:45 +09:00
bors
05cb0df748
Auto merge of #5033 - JohnTitor:split-use-self, r=flip1995
...
Split up `use_self` ui test
Part of #2038
changelog: none
2020-01-13 20:21:04 +00:00
ThibsG
44fb8b5e88
Extract visitor to utils
2020-01-13 16:50:11 +01:00
ThibsG
d3c76b5b2a
Change note message
2020-01-13 16:25:35 +01:00
ThibsG
95cc500e9d
Fix formatting
2020-01-13 16:25:35 +01:00
ThibsG
e5c9073f9c
Better binding name on Err for note
2020-01-13 16:25:35 +01:00
ThibsG
f79c47f28d
Match underscore-prefixed variable also
2020-01-13 16:25:35 +01:00
bors
920cdb59e1
Auto merge of #5042 - JohnTitor:rustup-0112, r=phansch
...
Rustup to rust-lang/rust#68045
This is blocked because `rustc_lint::context` is not pub module and `CheckLintNameResult` is not marked as `pub use`.
changelog: none
2020-01-13 13:17:27 +00:00
Yuki Okushi
ce1c6b285d
Rustup to rust-lang/rust#68045
2020-01-13 21:55:57 +09:00