From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EE6611F4CAA; Thu, 20 Mar 2025 07:34:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742456063; cv=none; b=enXF75o6V4N/lBE+34bSp/kmLijKyzaySV8TgIyeMB0hwXarc4liQ6tn8foB/mYwrB2NQLCzDzOzleFOXHOYEq3iMP0dto/KXwUwEHDw1aWXQe17PqzLY3UVIcEWRDUfzGSoXVGGuMc36W4Uh/023WLm4kynewXV+o5yC5CSwbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742456063; c=relaxed/simple; bh=D8dEjTpCok8GhumKlynQf36TwBF26qcEOQJa75sXYwM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=GR/iPrjHalZ5LjdFTEiMkXQADWDfeY2lgRGRTg/J0oUbm1lX8wmSZErRCjV/zLGIRCx8c2Zr+Qxc5/24va0Pd4PCAsxGZ9q2d8ZuQq2mZtWMo7Khj905tHpWzmxMGHwmTIRgvMXLhWDGTnE8dNAFVi+aF9PZgbafCIp7JKqzScA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=T+P69TQ5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="T+P69TQ5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 940A4C4CEEC; Thu, 20 Mar 2025 07:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742456062; bh=D8dEjTpCok8GhumKlynQf36TwBF26qcEOQJa75sXYwM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=T+P69TQ5Ud7PPISyxUjWGt4LntRsjBZFE8ItGUVLxjXKltHFHJ/ZMSaxbQwzgK1DM YAB2qrK1xTKlk2KDcZv9HDjY5Tz9ejJonjXAZ3vyxG55wYXiCNsF/Ikh9Nt5XrWqIv Qxbzurion/SX1sORPg8z/gRISPqfFBPhE4PixUzIrfjkPPuY5Qoy3i0njXkxchYS4M rWrdBMxumzTShbIv5ftN0rrXpwjc9mn+kKgtTmbUuiwtk6DCuofZxXa5TWINocXfR2 5wa++JRKytY40ANju3/ScagMq/jRuQdHjsjVue/WtCKYRzGL30Qyp//J6CL50RnNzX 0BzTE4KL8juVA== From: Andreas Hindborg To: "Antonio Hickey" Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , "Benno Lossin" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , , Subject: Re: [PATCH v5 17/17] rust: clippy: disallow `addr_of[_mut]!` macros In-Reply-To: <20250320020740.1631171-18-contact@antoniohickey.com> (Antonio Hickey's message of "Wed, 19 Mar 2025 22:07:36 -0400") References: <20250320020740.1631171-1-contact@antoniohickey.com> <20250320020740.1631171-18-contact@antoniohickey.com> User-Agent: mu4e 1.12.7; emacs 29.4 Date: Thu, 20 Mar 2025 08:33:24 +0100 Message-ID: <87ldt0dum3.fsf@kernel.org> 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 "Antonio Hickey" writes: > 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: Andreas Hindborg Best regards, Andreas Hindborg