about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2020-02-04Merge fixesThibsG-4/+6
2020-02-04Add wild and struct handlingThibsG-36/+272
2020-02-04Use span_lint_and_sugg + move infaillible lintThibsG-112/+166
- moving infaillible lint to prevent collisions
2020-02-04Add new lint: match with a single binding statementThibsG-4/+98
- Lint name: MATCH_SINGLE_BINDING
2020-02-03Auto merge of #5130 - JohnTitor:split-up-index-slice, r=flip1995bors-117/+130
Split up `indexing_slicing` ui test Closes #2038 Now all the stderrs are less than 200 lines :tada: changelog: none
2020-02-03Auto merge of #5129 - JohnTitor:use-checked-sub, r=flip1995bors-3/+11
Use `checked_sub` to avoid index out of bounds (Fixes) #4681 (possibly) The issue likely occurs due to `lit_snip.len() < suffix.len() + 1`. You can see similar backtrace to change it to `lit_snip.len() - suffix.len() - 1000` or something then run `cargo test --release`. But I couldn't come up with the test so I'd leave the issue open if we want. changelog: Fix potential ICE in `misc_early`
2020-02-04Remove unnecessary commentYuki Okushi-7/+3
2020-02-03Auto merge of #5127 - Areredify:issue-5115, r=flip1995bors-2/+3
improve 'iter_nth_zero' documentation closes #5115 changelog: Improve the documentation of `iter_nth_zero`
2020-02-03improve 'iter_nth_zero' documentationAreredify-2/+3
2020-02-03Use `checked_sub` to avoid index out of boundsYuki Okushi-3/+11
2020-02-03Decrease line length limit for stderrsYuki Okushi-1/+1
2020-02-03Split up `indexing_slicing` ui testYuki Okushi-116/+133
2020-02-02Auto merge of #5120 - JohnTitor:split-up-drop-forget-ref, r=flip1995bors-244/+275
Split up `drop_forget_ref` ui test Part of #2038 changelog: none
2020-02-02Auto merge of #5119 - JohnTitor:tweak-doc, r=flip1995bors-3/+3
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
2020-02-01Auto merge of #5123 - JohnTitor:rustup-0202, r=matthiaskrgrbors-2/+6
Rustup to rust-lang/rust#68133 changelog: none
2020-02-02Rustup to rust-lang/rust#68133Yuki Okushi-2/+6
2020-02-01Split up `drop_forget_ref` ui testYuki Okushi-244/+275
2020-02-01Pin versions to trigger lint correctlyYuki Okushi-3/+3
2020-01-31Auto merge of #5116 - matthiaskrgr:rustup_29, r=flip1995bors-29/+29
update test stderr changelog: none
2020-01-31update test stderrMatthias Krüger-29/+29
2020-01-31Auto merge of #5106 - flip1995:dbg_assert_mut_async, r=oli-obkbors-58/+68
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.
2020-01-31Move debug_assertions_with_mut_call to nurseryflip1995-4/+3
2020-01-31Add test for `await` in `debug_assert!(..)`flip1995-29/+38
2020-01-31Don't trigger `debug_assert_with_mut_call` on `.await`flip1995-1/+3
2020-01-31Small refactor of mutable_debug_assertionsflip1995-24/+24
2020-01-31Auto merge of #5111 - flip1995:changelog, r=phanschbors-3/+48
Update changelog [Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md) r? @phansch changelog: none
2020-01-31Auto merge of #5109 - phansch:ciao_util_dev, r=flip1995bors-73/+61
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
2020-01-31Mark clippy_project_root as `must_use`Phil Hansch-0/+1
Co-Authored-By: Philipp Krones <hello@philkrones.com>
2020-01-31Replace one more copy-pasted clippy_project_root fnPhilipp Hansch-20/+3
2020-01-30Auto merge of #5110 - Aloso:patch-1, r=flip1995bors-24/+50
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
2020-01-30Un-ignore most code blocks to render correctly on website, correct mistakesLudwig Stecher-21/+47
2020-01-30Update changelogflip1995-3/+48
2020-01-30Fix code formatting for more lintsLudwig Stecher-9/+9
2020-01-30Auto merge of #5108 - JohnTitor:split-up-0130, r=flip1995bors-347/+178
Split up `match` ui test Part of #2038 Also, this decreases the line length limit to 220. changelog: none
2020-01-30Fix syntax highlighting of code fenceLudwig Stecher-1/+1
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.
2020-01-30Move project_root function to clippy_dev/src/lib.rsPhilipp Hansch-30/+21
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.
2020-01-30Deprecate util/dev in favor of cargo aliasPhilipp Hansch-28/+41
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.
2020-01-30Auto merge of #5101 - Areredify:let_underscore_lock, r=flip1995bors-18/+139
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
2020-01-30Auto merge of #5107 - JohnTitor:revive-test, r=flip1995bors-16/+21
Revive test in `enum_clike_unportable_variant` Revive one test since mentioned ICE has been resolved. changelog: none
2020-01-30lint all guard types, not just lock functionsAreredify-45/+72
2020-01-30decouple 'let_underscore' testsMikhail Babenko-48/+53
2020-01-30add lintMikhail Babenko-19/+108
2020-01-30Decrease line length limit for stderr filesYuki Okushi-1/+1
2020-01-30Split up `match` ui testYuki Okushi-346/+177
2020-01-30Revive test in `enum_clike_unportable_variant`Yuki Okushi-16/+21
2020-01-29Auto merge of #5058 - xiongmao86:issue4903, r=flip1995bors-7/+115
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;`).
2020-01-30Reformat code.xiongmao86-5/+5
2020-01-30Add test and update reference.xiongmao86-0/+34
2020-01-30Declare lint and implement lint logic.xiongmao86-2/+76
2020-01-29Auto merge of #5104 - JohnTitor:rustup-0129, r=Manishearthbors-1/+1
Rustup to rust-lang/rust#68512 changelog: none