diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-09-26 06:36:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-26 06:36:32 +0200 |
| commit | 07d13a646937613ef17cc1277f0d3bb0aa48a5ca (patch) | |
| tree | 598caa658fc2c6ccfce7809481916ff77992753d | |
| parent | b184550f0ede53826ac03aeb107c46e43e39d232 (diff) | |
| parent | a2d286992409d8077a03e0994a3839abdbfccc90 (diff) | |
| download | rust-07d13a646937613ef17cc1277f0d3bb0aa48a5ca.tar.gz rust-07d13a646937613ef17cc1277f0d3bb0aa48a5ca.zip | |
Rollup merge of #146994 - cuviper:clippy-ci-recursion, r=Kobzol
Add `clippy::unconditional_recursion` to `./x clippy ci`
The clippy lint catches some things that rustc's equivalent builtin lint
does not, for example rust-lang/rust#146940:
error: function cannot return without recursing
--> library/std/src/path.rs:3428:5
|
3428 | / fn eq(&self, other: &String) -> bool {
3429 | | self == &*other
3430 | | }
| |_____^
|
note: recursive call site
--> library/std/src/path.rs:3429:9
|
3429 | self == &*other
| ^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
= note: requested on the command line with `-D clippy::unconditional-recursion`
| -rw-r--r-- | src/bootstrap/src/core/build_steps/clippy.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/clippy.rs b/src/bootstrap/src/core/build_steps/clippy.rs index 2083c675e1f..d5b15d79086 100644 --- a/src/bootstrap/src/core/build_steps/clippy.rs +++ b/src/bootstrap/src/core/build_steps/clippy.rs @@ -564,6 +564,7 @@ impl Step for CI { "clippy::same_item_push".into(), "clippy::single_char_add_str".into(), "clippy::to_string_in_format_args".into(), + "clippy::unconditional_recursion".into(), ], forbid: vec![], }; @@ -591,6 +592,7 @@ impl Step for CI { "clippy::same_item_push".into(), "clippy::single_char_add_str".into(), "clippy::to_string_in_format_args".into(), + "clippy::unconditional_recursion".into(), ], forbid: vec![], }; |
