From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83E583C197E for ; Thu, 4 Jun 2026 19:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780601467; cv=none; b=lzK24W7HG4TMixvW64+LJyKhdbNbt57mWlAZDiHdmmz8/lcllkNA8LIFBzjay2hhmRq/qkFRENrpUkQLXSuULF4nQtE74iOB9GND7pOtc6nnMQUtKtVd78hcqUQAjbTfQSyu9eOfT41Dp/knQ11Iixsz+TmhHkfew2uMeZXvVJM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780601467; c=relaxed/simple; bh=HFYdEAs+JH3albeAFxDWqcgwOkU7UXOP/pCADtCn1fU=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=GAbGMFi2pixCUtIhFTXQVp6ci6IoTIiAUI2WsrfJoM7kZK4pJBEvdNe6d0JDBaW1JW+zLm/vQzrmY7C8hAjJz21J9XPX/j8an6PXV32zbjFbXvvYrgyDdV2oO4Se5BaFbfAL2GI3UF4vxop8i/Vp9BSIbCTyizyZEovXIyaLH24= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cDz1O6OL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cDz1O6OL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A907C1F00893; Thu, 4 Jun 2026 19:31:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780601466; bh=HFYdEAs+JH3albeAFxDWqcgwOkU7UXOP/pCADtCn1fU=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=cDz1O6OL4CTZzNv9JHA1/QlPDvXJ3vNTP5vO8SUMhMU+LLmdu3XaH6O/FbhI/kVTZ XBrvFxf4rMqLBJVahuLIKHB95B7E28gqpvEceghKXyyPIdPE2Zzrqvb7Anl3vAXzQW GuGXsV9tcCZi4cFAfvhwymPqooedwqyKcS49wlgIQD9WK8+o0FbBL2061hL77CcyDU wz+PZH1kucNlHHsHbgtltxF8X2DTGINlw2iLwlM0dw3+s/hjJ5prXOPuNCCuqnxSIh rfaOCYOcwCdaPnGsl36jGByb7cDdulsvkA0wCoNyNd4mdaC4G7nbHbVb6TOAk9wmYS ILTASytcLamdQ== Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id 90793F40084; Thu, 4 Jun 2026 15:31:04 -0400 (EDT) Received: from phl-imap-16 ([10.202.2.88]) by phl-compute-10.internal (MEProxy); Thu, 04 Jun 2026 15:31:04 -0400 X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFI0hAjNyp3c6LtVjJMFoMG5hahGlho6D+/MU4SEN/s40Z7x8ZaJoiOHJae1daTHN drHbwW48fs4Bc/4uj/2IzwzlUjUl0IUqQxWU9c03vmViumPpBPdv55AK6a6CTVntWrLJd7 77OjScC02I+DAfKHyYL9w3yxLc1SqNEG48iiCnjH6rQLYfd7L7nhKzxs4wEVi0zTd2/JHU 3hWJUlrGanLe4AhBp3SsBEAo/flaQd7laDdYpE33oz2XEI3uzhLOROb6OTvXnuIUugTxhA rqObKF5RIjOGGsj4ItNNoaftdpcY8Wm1F1JuYYDim/HjrdecIAWx22wBkr3O6+ppAXVMZX oGFncD0qulxG0k6ox1aoTDMDYTCwJxz0ZAlsOV1IJ2lKSjN5b8E7BjVpFCl3m2cHB672Zk MTS2cPFAVZFsjEErI7aOeZeMyQP0P2k7A6k0ETqJFHpRuW7TcNfcjJ08lI/26RbMS9w7En 2dny5OEY7WfHg+eoYCosi/tXev+WBUNPcshJ76OqrJi1svxCi0jcP0nPCj9DqzlMu4SFe1 UUMhluMAgHSE9SAVA+Ek7XxO5cMBYXCClOJYOqWLGBupcboYJUKdBo9Hl9ma6Y2+UZBNil WJxA3evwan4GCiheAfFIVc5HEXf/MmAkFeoJnUDnu4JnxyA0nQbqRwm3D4aw X-ME-Proxy: Feedback-ID: i8dbe485b:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 659462CC0083; Thu, 4 Jun 2026 15:31:04 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 04 Jun 2026 12:30:44 -0700 From: "Boqun Feng" To: "Miguel Ojeda" , "Ashutosh Desai" Cc: "Miguel Ojeda" , "Peter Zijlstra" , "Ingo Molnar" , "Will Deacon" , wl@lyx.org, "Gary Guo" , bjorn3_gh@protonmail.com, "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Message-Id: <9a605dbf-91b7-47e2-b25a-28671abcc38a@app.fastmail.com> In-Reply-To: References: <20260502160057.3402896-1-ashutoshdesai993@gmail.com> Subject: Re: [PATCH v2] rust: sync: add #[must_use] to GlobalGuard and GlobalLock::try_lock Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Jun 4, 2026, at 11:44 AM, Miguel Ojeda wrote: > On Sat, May 2, 2026 at 6:02=E2=80=AFPM Ashutosh Desai > wrote: >> >> Guard is marked #[must_use] since dropping it releases the lock. Glob= alGuard >> wraps Guard with identical semantics but was missing the annotation, = so >> discarding it would silently compile without warning. >> >> Similarly, GlobalLock::try_lock was missing #[must_use]. Option do= es not >> propagate #[must_use] from T, so the attribute needs to be on the fun= ction >> directly - same reason Lock::try_lock has it. >> >> Reviewed-by: Alice Ryhl >> Signed-off-by: Ashutosh Desai > > I could pick this one -- do you want me to, Boqun? > Yes, please! Thank you! Regards, Boqun > Cheers, > Miguel