From 061ffe80ffadd10282da735dd734e3a553d360cf Mon Sep 17 00:00:00 2001 From: Pyrode Date: Mon, 30 Jun 2025 18:26:38 +0530 Subject: [PATCH] test: Updated `fix::fix_only_once_for_duplicates` --- tests/testsuite/fix.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/testsuite/fix.rs b/tests/testsuite/fix.rs index db0fef2..973b54a 100644 --- a/tests/testsuite/fix.rs +++ b/tests/testsuite/fix.rs @@ -1,5 +1,5 @@ //! Tests for the `cargo fix` command. -//! +//! use std::env; use std::path::{Path, PathBuf}; @@ -2619,7 +2619,8 @@ fn fix_only_once_for_duplicates() { r#" macro_rules! foo { () => { - &1; + let x = Box::new(1); + std::mem::forget(&x); }; } @@ -2646,7 +2647,8 @@ fn main() { macro_rules! foo { () => { - let _ = &1; + let x = Box::new(1); + let _ = &x; }; }