about summary refs log tree commit diff
path: root/tests
AgeCommit message (Collapse)AuthorLines
2020-01-19Auto merge of #5032 - JohnTitor:add-sugg-some-result, r=flip1995bors-38/+95
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-19Treat more strange patternYuki Okushi-3/+3
2020-01-19Split up `if_same_then_else` ui testYuki Okushi-280/+279
2020-01-19Apply review commentsYuki Okushi-19/+15
2020-01-19Reduce span rangeYuki Okushi-8/+2
2020-01-19Rename `ok_if_let` to `if_let_some_result`Yuki Okushi-2/+2
2020-01-19Apply review commentsYuki Okushi-8/+6
2020-01-19Add suggestion in `if_let_some_result`Yuki Okushi-6/+75
2020-01-18Auto merge of #5065 - matthiaskrgr:rustup_28, r=matthiaskrgrbors-3/+1
rustup https://github.com/rust-lang/rust/pull/67712 slice_patterns have been stabilized. changelog: none
2020-01-18rustup https://github.com/rust-lang/rust/pull/67712Matthias Krüger-3/+1
slice_patterns have been stabilized.
2020-01-18Auto merge of #5046 - JohnTitor:order-nonminimal-bool, r=flip1995bors-264/+338
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-18Allow `unused_self` lint at the function levelYuki Okushi-0/+18
2020-01-16Auto merge of #4994 - bradsherman:new_lint_gen, r=flip1995bors-0/+49
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-16Update custom_ice_message.stderrflip1995-1/+1
2020-01-15Add lint for default lint descriptionBrad Sherman-0/+49
- Lint for any new lints that have the default lint description from the automation
2020-01-15Auto merge of #5034 - ThibsG:MatchWildErrArmImprove5024, r=flip1995bors-21/+78
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](https://github.com/rust-lang/rust-clippy/blob/43ac9416d935942d6c7d2b2e0c876c551652c4ec/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-14Omit doc safety/errors header checking for mainAndre Bogus-1/+3
2020-01-14Split up `booleans` ui testYuki Okushi-305/+337
2020-01-13Auto merge of #4543 - xiongmao86:issue4503, r=flip1995bors-1/+51
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-14Fix the ordering on `nonminimal_bool`Yuki Okushi-27/+69
2020-01-13Auto merge of #5033 - JohnTitor:split-use-self, r=flip1995bors-332/+342
Split up `use_self` ui test Part of #2038 changelog: none
2020-01-13Change note messageThibsG-8/+8
2020-01-13Better binding name on Err for noteThibsG-1/+1
2020-01-13Match underscore-prefixed variable alsoThibsG-15/+72
2020-01-13Rustup to rust-lang/rust#68045Yuki Okushi-5/+8
2020-01-12Fix grammar error.xiongmao86-1/+1
2020-01-12Change lint message.xiongmao86-3/+3
2020-01-12Extend spans to include !.xiongmao86-2/+2
2020-01-12Fix lint warning in compile-test.rsxiongmao86-1/+1
2020-01-12format codebase.xiongmao86-1/+1
2020-01-12Add lint logic.xiongmao86-0/+27
2020-01-12Add test.xiongmao86-0/+23
2020-01-12Split up `use_self` ui testYuki Okushi-332/+342
2020-01-12Comment out half-open patterns' testsYuki Okushi-25/+4
2020-01-11Rustup to rust-lang/rust#67806Yuki Okushi-5/+3
2020-01-11Apply review commentsYuki Okushi-11/+48
2020-01-10Split up `missing-doc` ui testYuki Okushi-202/+214
2020-01-09Add memory fence tests for `invalid_atomic_ordering`Krishna Sai Veera Reddy-0/+39
2020-01-09Lint vectored IO in unused_io_amount lintShotaro Yamada-5/+23
2020-01-09Auto merge of #4960 - ThibsG:patterns_with_wildcard_#4640, r=flip1995bors-7/+90
New lint: pats_with_wild_match_arm Wildcard use with other pattern in same match arm. The wildcard covers other(s) pattern(s) as it will match anyway. changelog: add new lint when multiple patterns (including wildcard) are used in a match arm. Fixes #4640.
2020-01-08Auto merge of #5022 - flip1995:useless_attr, r=phanschbors-4/+77
Fix useless_attribute suggestion Fixes #5021 changelog: Fix [`useless_attribute`] suggestion, which tripped rustfix
2020-01-08Add regression test for useless_attribute lintflip1995-4/+77
2020-01-08Auto merge of #5017 - sinkuu:mir_no_opt_fallout, r=flip1995bors-3/+27
Fix redundant_clone lint not working with PathBuf and OsString https://github.com/rust-lang/rust-clippy/pull/4825 diabled MIR optimization in clippy, including `rustc_mir::transform::InstCombine` which reduces `&(*x)` to `x`. This PR tries to unwrap `&*` when looking into `mir::Rvalue`s. Fixes #5014. --- changelog: fixed `redundant_clone` lint not working with `PathBuf` and `OsString`
2020-01-08Normalize lint messages in cast_precision_lossYuki Okushi-17/+17
2020-01-08Fix `redundant_clone`Shotaro Yamada-3/+27
2020-01-07Span help without suggestionThibsG-48/+15
2020-01-07Change lint name to WILDCARD_IN_OR_PATTERNSThibsG-9/+9
2020-01-07Handle case for non-exhaustive enumsThibsG-8/+8
2020-01-07Move to complexity and adapt testThibsG-7/+19
- test wildcard_enum_match_arm has been impacted by this new lint
2020-01-07New lint: pats_with_wild_match_armThibsG-0/+104
- Wildcard use with other pattern in same match arm