| Age | Commit message (Collapse) | Author | Lines |
|
|
|
misc: rm "as shown" from help message - clippy guidelines recommend against this
misc: pull conditions into let-chain
misc: use `Span::to`
misc: inline `{l,r}_ty`
misc: move the type checks out of `check_comparison`
misc: make test cases much less verbose
|
|
This reverts commit 585a40963ea59808e74803f8610659a505b145e0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes https://github.com/rust-lang/rust-clippy/issues/15497
changelog: [`bool_comparison`]: fix incorrect suggestion with `>`/`<`
and macros
|
|
|
|
Fixes an issue where if the underlying `Once` panics because it is
poisoned, the panic displays the wrong message.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
|
|
Remove default config from bootstrap
This PR removes the default config initialization from parse_inner, as it introduced many assumptions during config setup. Instead, each variable is now manually initialized to eliminate certain invariants in parse_inner and streamline the process.
r? `@Kobzol`
|
|
(#15492)
fixes https://github.com/rust-lang/rust-clippy/issues/15326
changelog: [`manual_is_ascii_check`]: also add explicit type when
linting `matches!`
|
|
|
|
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
|
|
|
|
When encountering an unmet trait bound, point at local type that doesn't implement the trait:
```
error[E0277]: the trait bound `Bar<T>: Foo` is not satisfied
--> $DIR/issue-64855.rs:9:19
|
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
| ^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `Foo` is not implemented for `Bar<T>`
--> $DIR/issue-64855.rs:9:1
|
LL | pub struct Bar<T>(<Self as Foo>::Type) where Self: ;
| ^^^^^^^^^^^^^^^^^
```
|
|
|
|
|
|
|
|
Fixes https://github.com/rust-lang/rust-clippy/issues/15232
changelog: [`ptr_as_ptr`]: fix incorrect suggestion with `pointer::cast`
and macros
|
|
changelog: none
|
|
This makes the last arm significantly shorter, but marginally shortens
the other ones as well
- I first removed the length comparisons from the match guards since
they were already present in `(unordered_)over`, but then brought them
back since they are quite a helpful "guard clause"
- It's a bit unfortunate that the `Slice`/`Array` arm can't use `over`
as well, which creates some asymmetry, but changing the signature of
`over` to accept arbitrary iterators felt like too much to me,
especially because we'd lose the ability to compare the lengths of the
two inputs (which could've been mitigated by `ExactLenIterator::len`,
but that method is still unstable AFAIR)
One other option would be to only use `unordered_over` in the last arm,
and not `over`, but I think `over` is not that bad..
changelog: none
|
|
https://github.com/rust-lang/rust-clippy/issues?q=state%3Aclosed%20label%3Abeta-accepted
Those were missed in the prior backport. The two beta-accepted issues
that were not added were done as reverts of the prior changes they
fixed. So no reason to add them to the changelog.
changelog: none
|
|
`assign_op_pattern` can be used in a `const` context if the trait
definition as well as the implementation of the corresponding `Assign`
pattern is `const` as well.
The lint was temporarily deactivated in the compiler repository for all
`const` contexts to avoid false positives when operators were
potentially constified. This reenables it when appropriate now that the
repositories have been synced.
Closes rust-lang/rust-clippy#15285
changelog: [`assign_op_pattern`]: trigger in `const` contexts when
appropriate
r? @flip1995
|
|
|
|
|
|
To reduce risk of regressing on generating debuginfo e.g. in the form of
ICE:s. This will also ensure that future ui tests support different
debuginfo levels.
When I looked at run time for different CI jobs, **x86_64-gnu-debug**
was far from the bottle neck, so it should be fine to make it perform
more work.
|
|
Clippy subtree update
r? `@Manishearth`
|
|
|
|
|
|
|
|
|
|
changelog: none
|
|
This more closely matches the RFC and what our T-lang contact has asked
for, see https://github.com/rust-lang/rust/issues/136889#issuecomment-3212715312
|
|
|
|
Example
---
```rust
fn f() {
if true && $0 {}
}
```
->
```rust
fn f() {
if true && let $1 = $0 {}
}
```
|
|
The difference between `Late` and `All` only matters when `finalize` is enabled.
So add a `stage` field to `Finalize` and use it instead.
|
|
|
|
It can be passed in a more usual way through `ParentScope`
|
|
|
|
* revise comments explaining why we are using literal or expression
* add unspecified precision comments as we don't guarantee precision
* use expression in `f128::to_degrees()`
* make `f64::to_degrees()` impl consistent with other functions
|
|
`assign_op_pattern` can be used in a `const` context if the
trait definition as well as the implementation of the corresponding
`Assign` pattern is `const` as well.
|
|
|
|
|
|
|
|
|
|
|