diff options
| author | Josh Stone <jistone@redhat.com> | 2025-09-24 09:56:57 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-09-25 10:08:23 -0700 |
| commit | a2d286992409d8077a03e0994a3839abdbfccc90 (patch) | |
| tree | a25df7563f4d907524b9e1b3892aea2e5d29dab9 /src/bootstrap | |
| parent | 7cfd7d328b14b936c7ffede92cacebe8557c6388 (diff) | |
| download | rust-a2d286992409d8077a03e0994a3839abdbfccc90.tar.gz rust-a2d286992409d8077a03e0994a3839abdbfccc90.zip | |
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`
Diffstat (limited to 'src/bootstrap')
| -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![], }; |
