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 9A0422EAB90; Thu, 14 Aug 2025 09:09:37 +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=1755162577; cv=none; b=bCy3UNyn/6IfsRx7TZMK+3qdzInfrVctj8lZIneEYjTmz0MJQJI/lKkP0rUNL0YsuARG3mdkwytqC1dct/a7KzRa2tqF3iB/Ll43xmoW9MJM5QIqVYIYYUInO4i6bqBFdHP5iLbglaoZzb0e/f/agPNi7Bgp0Ka7MV3baDiewTk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755162577; c=relaxed/simple; bh=dreDucqT4dEwFzw6JVDel4la7nqdTW1U39TroTgdP+Y=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=MsRFOHDD2u4hCLW9nXq9lZWd2V5MF4rW71mCJwMh492UZMZ8YDtO/vv+oLRxUk57973jqHUuunlmah01Ak4dStl9bvssh0g4J51hgyoORXZMthRrGQWw00IOMiUCjGoFfbYTtTzUNZBSXixYOiRtggoWN4nJHBYUnXqQ9T13AwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UIJrJcgz; 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="UIJrJcgz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4EE7C4CEED; Thu, 14 Aug 2025 09:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755162577; bh=dreDucqT4dEwFzw6JVDel4la7nqdTW1U39TroTgdP+Y=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=UIJrJcgzc0u9OjPbU9hjdZLcpqTlKBuDVEAY8XjE2GGarE98yvA11lWUisbtFSIEU o0vNpmaCIPU8V8r8Oi69gX1xvw/w6afzpIa3dG5JbHhpCZwN6g3nT8HTQfm9sqo87R o9FcrEfgy4EarFY40rJ2XZPVcQTEQVxDo4ZJ8Nu7V4h//njR1v+pPpmTrgfMSoCjtO /tFpconJvEmr0VUlSnwcinn/mM0ody+Lad3XtIGDvaMaWwVKipbOZvHnPrgf+2Url0 ud7RtUQcszCUldasw6JVFMDsT9QzClHJNTAzM3eJ0p2eoU8rL/0W/nrAR+NQUQ2Tkd SRi6rRFIsj7XQ== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 14 Aug 2025 11:09:32 +0200 Message-Id: Cc: "Lyude Paul" , , Subject: Re: [PATCH v2 03/13] rust: pin-init: add `zeroed()` & `Zeroable::zeroed()` functions From: "Benno Lossin" To: "Andreas Hindborg" , "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , "Fiona Behrens" , "Christian Schrefl" X-Mailer: aerc 0.20.1 References: <20250523145125.523275-1-lossin@kernel.org> <20250523145125.523275-4-lossin@kernel.org> <87pld65fcr.fsf@kernel.org> In-Reply-To: <87pld65fcr.fsf@kernel.org> On Fri Aug 8, 2025 at 11:31 AM CEST, Andreas Hindborg wrote: > "Benno Lossin" writes: > >> `zeroed()` returns a zeroed out value of a sized type implementing >> `Zeroable`. >> >> The function is added as a free standing function, in addition to an >> associated function on `Zeroable`, because then it can be marked `const` >> (functions in traits can't be const at the moment). > > Do you want to add a note on this in the code, so we can const the trait > function and let go of the other one if it becomes possible in the > future? I'll create an issue instead (the commit is already merged). --- Cheers, Benno