| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
- moving infaillible lint to prevent collisions
|
|
- Lint name: MATCH_SINGLE_BINDING
|
|
Split up `indexing_slicing` ui test
Closes #2038
Now all the stderrs are less than 200 lines :tada:
changelog: none
|
|
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`
|
|
|
|
improve 'iter_nth_zero' documentation
closes #5115
changelog: Improve the documentation of `iter_nth_zero`
|
|
|
|
|
|
|
|
|
|
Split up `drop_forget_ref` ui test
Part of #2038
changelog: none
|
|
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
|
|
Rustup to rust-lang/rust#68133
changelog: none
|
|
|
|
|
|
|
|
update test stderr
changelog: none
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
Update changelog
[Rendered](https://github.com/flip1995/rust-clippy/blob/changelog/CHANGELOG.md)
r? @phansch
changelog: none
|
|
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
|
|
Co-Authored-By: Philipp Krones <hello@philkrones.com>
|
|
|
|
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
|
|
|
|
|
|
|
|
Split up `match` ui test
Part of #2038
Also, this decreases the line length limit to 220.
changelog: none
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
Revive test in `enum_clike_unportable_variant`
Revive one test since mentioned ICE has been resolved.
changelog: none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;`).
|
|
|
|
|
|
|
|
Rustup to rust-lang/rust#68512
changelog: none
|