rust/tests
bors 9907b90b1e Auto merge of #11938 - GuillaumeGomez:unconditional_recursion, r=llogiq
Add new `unconditional_recursion` lint

Currently, rustc `unconditional_recursion` doesn't detect cases like:

```rust
enum Foo {
    A,
    B,
}

impl PartialEq for Foo {
    fn eq(&self, other: &Self) -> bool {
        self == other
    }
}
```

This is because the lint is currently implemented only for one level, and in the above code, `self == other` will then call `impl PartialEq for &T`, escaping from the detection. The fix for it seems to be a bit tricky (I started investigating potential solution to add one extra level of recursion [here](https://github.com/rust-lang/rust/compare/master...GuillaumeGomez:rust:trait-impl-recursion?expand=1) but completely broken at the moment).

I expect that this situation will remain for a while. In the meantime, I think it's acceptable to check it directly into clippy for the time being as a lot of easy cases like this one can be easily checked (next I plan to extend it to cover other traits like `ToString`).

changelog: Add new `unconditional_recursion` lint
2023-12-16 18:21:01 +00:00
..
test_utils
ui Auto merge of #11938 - GuillaumeGomez:unconditional_recursion, r=llogiq 2023-12-16 18:21:01 +00:00
ui-cargo Merge remote-tracking branch 'upstream/master' into rustup 2023-12-05 17:29:25 +01:00
ui-internal Merge remote-tracking branch 'upstream/master' into rustup 2023-12-01 18:06:03 +01:00
ui-toml Auto merge of #11853 - J-ZhengLi:issue11814, r=llogiq 2023-12-02 14:03:46 +00:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs
dogfood.rs
headers.rs Tolerate hidden, binary files in tests/ 2023-12-02 13:32:21 +00:00
integration.rs Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug. 2023-12-02 09:01:19 +11:00
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs