From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) (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 B648E20408D for ; Sun, 23 Mar 2025 10:41:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742726515; cv=none; b=vCwQ1ujw9zCxf57kxre21U0nRSl5TMXCvOdUpg/dY6lMDr/wliL2YQtmkBYIxExsHeu2WMjQ4ungDZDzG0QRetxRyB7ptOqgv2MGg7QER97INc7ng7VmTShCF20gP8eSs77zwtCvP76kcrWCKnY+XCipimq7UUal3V4RCpOqo/U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742726515; c=relaxed/simple; bh=sdF7VhGK5QqartT25xz0XzktC1JwQlwKTCSiMXSOwdU=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kATERPuuJo/podMLiXOcXpyTZ4LgPfDtbafVrDBKvYhczheGFRqDU9sLcDCm8FAaIGP+d791QZmskx3RDSiKlyVi9GP1+M0etFcQ+h+bbkxo8GGa4JUnbo7C7O5MCWrTEUDg95hEko+TvkuUQrd43Bj1YVJ8mPWB/ggyZPa8ZNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me; spf=pass smtp.mailfrom=proton.me; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b=CW1kWy9G; arc=none smtp.client-ip=185.70.40.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=proton.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=proton.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="CW1kWy9G" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1742726510; x=1742985710; bh=RDroXS8EH8dxs+A85SlVDo0XJpIxHTrGJsgkqKqGlTQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=CW1kWy9G4bTMURoeqYgOkAYYELZ7eyf7W0CJXDDzrrdakHHKVDbjl1NA6YwezVa+j HzFlW4zxLB/COTGJUsGmCqoq+ti/iLHnP23e/vUAEGNzS5OgpcJRHoECV5obQBctZL oCeB7qQaFKrO1Jiolab75opwuBfWxFGor/CsXnlE2YZ6dkjSgi6IeFpGQFOgWZrnpm HDJnJJo39a9J4t8yncZWbNYHvd88JgSTDw5gd12Rztn3dh5kX7gPp+E0rFsj4VCmFO mdki1TbWndaQKbM/qDSGRwORHG73T1d/Mi9xzosWsz7LLpoECmKWW+7AZHyHRec8fh yO03eRKy4tT1Q== Date: Sun, 23 Mar 2025 10:41:46 +0000 To: Antonio Hickey , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich From: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 17/17] rust: clippy: disallow `addr_of[_mut]!` macros Message-ID: In-Reply-To: <20250320020740.1631171-18-contact@antoniohickey.com> References: <20250320020740.1631171-1-contact@antoniohickey.com> <20250320020740.1631171-18-contact@antoniohickey.com> Feedback-ID: 71780778:user:proton X-Pm-Message-ID: 3d923fc74ccefd9a0655bdc81c763d3190c31943 Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu Mar 20, 2025 at 3:07 AM CET, Antonio Hickey wrote: > With the `raw_ref_op` feature enabled we no longer want to > allow use of the `addr_of!` and `addr_of_mut!` macros. > > We instead want to use `&raw const` and `&raw mut` to get raw > pointers to a place. > > Note that this lint isn't currently reliable, but we enable > it nevertheless because: > 1. Document that one shouldn't use the `addr_of[_mut]!` macros. > 2. When the lint becomes useful we will already have it enabled. > > Suggested-by: Benno Lossin > Link: https://github.com/Rust-for-Linux/linux/issues/1148 > Link: https://github.com/rust-lang/rust-clippy/issues/11431 > Signed-off-by: Antonio Hickey Reviewed-by: Benno Lossin --- Cheers, Benno > --- > .clippy.toml | 4 ++++ > 1 file changed, 4 insertions(+)