Skip to content

Commit 7a9ae0c

Browse files
committedJan 14, 2023
Auto merge of #106731 - flip1995:clippy_backport, r=Mark-Simulacrum
[beta] Clippy: Move manual_clamp to nursery There was a lot of discussion about this lint in rust-lang/rust-clippy#9484 (comment) We decided to move the lint to `nursery`. But since this lint broke code of many popular projects, we don't want to wait another release cycle until this move gets into stable. So we'd like to backport this commit to `beta`. cc `@rust-lang/clippy` for approval from the Clippy side.
2 parents 275123c + e74700c commit 7a9ae0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/tools/clippy/clippy_lints/src/manual_clamp.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ declare_clippy_lint! {
3535
/// Some may consider panicking in these situations to be desirable, but it also may
3636
/// introduce panicking where there wasn't any before.
3737
///
38+
/// See also [the discussion in the
39+
/// PR](https://github.com/rust-lang/rust-clippy/pull/9484#issuecomment-1278922613).
40+
///
3841
/// ### Examples
3942
/// ```rust
4043
/// # let (input, min, max) = (0, -2, 1);
@@ -78,7 +81,7 @@ declare_clippy_lint! {
7881
/// ```
7982
#[clippy::version = "1.66.0"]
8083
pub MANUAL_CLAMP,
81-
complexity,
84+
nursery,
8285
"using a clamp pattern instead of the clamp function"
8386
}
8487
impl_lint_pass!(ManualClamp => [MANUAL_CLAMP]);

0 commit comments

Comments
 (0)