diff --git a/master/lints.json b/master/lints.json index 2f41714f5fbc..c9907eb2a910 100644 --- a/master/lints.json +++ b/master/lints.json @@ -9271,6 +9271,21 @@ "applicability": "MachineApplicable" } }, + { + "id": "unconditional_recursion", + "id_span": { + "path": "src/unconditional_recursion.rs", + "line": 39 + }, + "group": "suspicious", + "level": "warn", + "docs": "\n### What it does\nChecks that there isn't an infinite recursion in `PartialEq` trait\nimplementation.\n\n### Why is this bad?\nThis is a hard to find infinite recursion which will crashing any code\nusing it.\n\n### Example\n```rust\nenum Foo {\n A,\n B,\n}\n\nimpl PartialEq for Foo {\n fn eq(&self, other: &Self) -> bool {\n self == other // bad!\n }\n}\n```\nUse instead:\n\nIn such cases, either use `#[derive(PartialEq)]` or don't implement it.", + "version": "1.76.0", + "applicability": { + "is_multi_part_suggestion": false, + "applicability": "Unresolved" + } + }, { "id": "undocumented_unsafe_blocks", "id_span": {