From d1e83ee8b7b5601969ea7a40316d525c0b20927c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Tue, 28 Oct 2025 19:18:22 +0100 Subject: [PATCH] Move `replace_box` into `nursery` `replace_box` is a new `perf` lint in Rust 1.92 which detects assignments of a newly created `Box` over an existing box instead of replacing the box content. However, the lint triggers even when the target of the assignment has been moved and is no longer replaceable without reassignment. Until this is fixed, this lint is moved to `nursery`. --- clippy_lints/src/replace_box.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/replace_box.rs b/clippy_lints/src/replace_box.rs index 4bbd1803a78d..3b162334395e 100644 --- a/clippy_lints/src/replace_box.rs +++ b/clippy_lints/src/replace_box.rs @@ -30,7 +30,7 @@ declare_clippy_lint! { /// ``` #[clippy::version = "1.92.0"] pub REPLACE_BOX, - perf, + nursery, "assigning a newly created box to `Box` is inefficient" } declare_lint_pass!(ReplaceBox => [REPLACE_BOX]);