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 058B22D94A4; Wed, 13 Aug 2025 14:40:00 +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=1755096001; cv=none; b=Z7GC/XvsSbEHgq7OCEUdgyPw0/pMFPhJ6fyvJJwdIEeCODWhu1D76AutAHD8u6s4WcV6KpIUowQflsF5GWYq8V7vIW8qxPEtoDS6RHxTjSj+nOZxi5Tb7qQpPFaordJ0t8CLrj4ivlVhds4LKaWDGR3P9vS9PUyVUhoeu5+tbDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755096001; c=relaxed/simple; bh=nIMn1kPl8ANV2TH1sXmHbDMsu1fIrTebb3WmS9IqLtc=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=DYtLXP+SDI3s+CXoJgvG/ci79dR3UjXQmmnDEVip2z7KXow9hZfK2TvOZtCZ/ECXSe/OjT4fpOC6nVQV9feMNsJm6e+uPc8cmeKfAtAOmkC+GEbFhDTesNvW1EYVXQYCTOW7CSQzDYGlBl3I9nldNVTNRIp+8EoiMwfj8n/w/30= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CbQsSzA9; 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="CbQsSzA9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFF34C4CEED; Wed, 13 Aug 2025 14:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755096000; bh=nIMn1kPl8ANV2TH1sXmHbDMsu1fIrTebb3WmS9IqLtc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CbQsSzA9gk13zrXG8Mguj441Rgv+J7xz1DDqTcWxw0E6w+KZJXfXDgVjh7xIWKHG7 j6BxIhjitWER3MKemcagzVbBuYX7kD62K9XfRR75YjcWhO7sCsh3QP6vSeKHndKiah 3ifftJCIQRcfZh7MG5Pz2XXiYyNT3B393+5hqtBdbEl6D+4QZZrmSHXGS+NJCQgafm 6RFGTmGeyREC+Xd/SyUzpTnMqIHHhW1zp9Xqjm/0jLxXARVc2HLBq0PTjCchGodC78 vfNdgtQlWz8exx6940Evo8+kimAI/sJC/hh5kLk/MimIJcyV9nWgXfG5bLu1CrKOPp xcCx6Bzx8Zu3A== Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 Aug 2025 16:39:53 +0200 Message-Id: From: "Benno Lossin" To: "Tamir Duberstein" Cc: "Miguel Ojeda" , "Alex Gaynor" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Luis Chamberlain" , "Russ Weight" , "Peter Zijlstra" , "Ingo Molnar" , "Will Deacon" , "Waiman Long" , "Nathan Chancellor" , "Nick Desaulniers" , "Bill Wendling" , "Justin Stitt" , "Christian Brauner" , , , Subject: Re: [PATCH v14 3/3] rust: replace `CStr` with `core::ffi::CStr` X-Mailer: aerc 0.20.1 References: <20250710-cstr-core-v14-0-ca7e0ca82c82@gmail.com> <20250710-cstr-core-v14-3-ca7e0ca82c82@gmail.com> In-Reply-To: On Wed Aug 13, 2025 at 4:06 PM CEST, Tamir Duberstein wrote: > On Tue, Aug 12, 2025 at 3:50=E2=80=AFAM Benno Lossin = wrote: >> On Thu Jul 10, 2025 at 4:53 PM CEST, Tamir Duberstein wrote: >> > +/// Extensions to [`CStr`]. >> > +pub trait CStrExt { >> >> Should we make this trait sealed? > > We can -- but is it harmful for someone to implement? I think probably no= t. I don't think anything aside from `CStr` should implement it, so I'd say we make it sealed. There are also safe functions that return raw pointers & an implementation could just return a bogus pointer... --- Cheers, Benno