From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-40134.protonmail.ch (mail-40134.protonmail.ch [185.70.40.134]) (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 BCBA11B964 for ; Thu, 4 Apr 2024 14:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.40.134 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712241712; cv=none; b=qjwQpQPRX70vFSQ7nvAi0b81ZdnRxlvqnJt2m5rqgQw9KjU8CwKMm8SLZSx1pBmriWVEEhYFrKfPTiLC6Ry6kCtQe5+4uzKj8EklkgK7kZMObYn0bRdGhhH9zZUbFu4T8DwOarhOcADvpH360jKnyvZX3InsCMm5DZ7PI3N5T7k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712241712; c=relaxed/simple; bh=c2FcGaMs92bL0DW+4qQKped7KrfVqul8MtmSpvK1eno=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GYc+ichltNJYWXq/dU8TIPxS85p2rGLGwbx89dTguaMpYkTcFS/kgG8bqc99htzrtyaF0UN4HzMgYDdRdUzD1laf7hmBINNFwU1awKHJ6XHytoOE+2DRFvw4XzL52V6LbGa4xCkySiIc7CoqgRa7ich7fB5iTNWgJK3o809hZJU= 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=XKdTzwkM; arc=none smtp.client-ip=185.70.40.134 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="XKdTzwkM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1712241706; x=1712500906; bh=1QVEMvbvy2roz2lqgS24Q8cvcM+QzhUJa+rGii5XAPQ=; 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; b=XKdTzwkMHugQPI19Ye5RMZ4bdXUCX+VLl48GQcwLIxO6YBg80Cjj+sgfSfdZbngNg L9F5t9xc+1l16VskyW9UDUcCYa9kULtrqo9H+m9wTgMN4mQnxV2bu5+ajvxbSi3T62 eSHDOqzrdSPPbyZwi4nyV5nzBJU/mTlXqjz3koXu1JOUK5eWjh2G2Q/C/NRbKczFAy JFKnKh5NvHD1BILK66X9uDipRnuYmybuCgfSE9GEkwkZYy/GUwNf88XXLiTCegBOoZ eBVfQS3cYMf4Ql6AQEL8xg9Dw7DM4vS2l7mso4JlAnbWjr1KGtemezD1BPesMRLUAP 5sNF1ELEJzYiA== Date: Thu, 04 Apr 2024 14:41:40 +0000 To: Alice Ryhl From: Benno Lossin Cc: Miguel Ojeda , Andrew Morton , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , Marco Elver , Kees Cook , Coly Li , Paolo Abeni , Pierre Gondois , Ingo Molnar , Jakub Kicinski , Wei Yang , Matthew Wilcox , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH 2/9] rust: list: add tracking for ListArc Message-ID: <69c87a65-59a4-4f65-8b93-a1dafef36d31@proton.me> In-Reply-To: References: <20240402-linked-list-v1-0-b1c59ba7ae3b@google.com> <20240402-linked-list-v1-2-b1c59ba7ae3b@google.com> <36306930-0390-4342-830d-03c11ec4a3a7@proton.me> Feedback-ID: 71780778:user:proton Precedence: bulk X-Mailing-List: linux-kernel@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 04.04.24 16:14, Alice Ryhl wrote: > On Wed, Apr 3, 2024 at 5:52=E2=80=AFPM Benno Lossin wrote: >> On 02.04.24 14:16, Alice Ryhl wrote: >>> + unsafe { <$fty as $crate::list::ListArcSafe<$num>>::on= _create_list_arc_from_unique( >>> + &mut *field >>> + ) }; >> >> Formatting? rustfmt gives me this: >> >> unsafe { >> <$fty as $crate::list::ListArcSafe<$num>>::on_crea= te_list_arc_from_unique( >> &mut *field >> ) >> }; >> >> (maybe the `;` should be inside the `unsafe` block in this case?) >=20 > I can make the change, but rustfmt does not affect macros. I think we still should try to format macros correctly, it increases readability. I take the in-macro code, remove all `$` and other macro-only symbols, then use rustfmt and then manually format the code accordingly. I also find it tedious, but the unformatted code also doesn't look good :) --=20 Cheers, Benno