Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp86293lqp; Thu, 4 Apr 2024 07:45:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvyGn1Yki5kCgrEE0GXzphCens8945X/C/ziLmK1qtk30keniHmvLiuI4vijptH5AAYreF27K7jSbsenlDAsUpWC8ODajjUPA36yIErg== X-Google-Smtp-Source: AGHT+IHlp+nun++9t+YY9Q4q3aTrPuCLvCRA6Cw1ssGgm8ZjSkkZIB3o3QW45XYd0ch1lQVu4K73 X-Received: by 2002:ac2:5337:0:b0:515:8c3e:5665 with SMTP id f23-20020ac25337000000b005158c3e5665mr2114285lfh.27.1712241924613; Thu, 04 Apr 2024 07:45:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712241924; cv=pass; d=google.com; s=arc-20160816; b=H9KRuzEYJqjadEJnOy9H43Wa5v74kBsmy8R5xXgHtnZpcNNfzc5wq72Omo8NBWZeHD TONlQ3nuMhF8tZ1LMlPOLgHQ54BFaEGmA3UyqkdqFNGQR1XdpHqkfnVGdfPDHtUNU7AL 6gOct0uvoy+OnxoZKIZajrfOQXPlJeX3zkD0iQ2iZq82zQAPNtGCw+8w4kwmb12FUxcn 8mWDPONjhovdnzfsPMu6+9MyginDepb94hkFVKvOAWifRVTJdpoxPg0fklUmVhnfOqR7 +eQqImORFNjnV3xH3zUO2ViFeB1JCW4SRhOIxsrmfn1LZHQlsIQXLCJsxjZDW8nZde3E naAw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=1QVEMvbvy2roz2lqgS24Q8cvcM+QzhUJa+rGii5XAPQ=; fh=NVLHYNxTFxZg90CuAUl5EFs9nACqSf1JvKaCbeMsn7U=; b=HFYOUFsS9GcugiFp8CNNo5/h/9VvjsZe1vhZ9wsAhDzSgInPOs21JurogVmz2FnpjZ bBRsG2EcMTHOdGr/9t1hVkVy/1JZ7LtwTMX7F3vIwFiBXS40LXdQuLNu0/RuOkEbnlOF d/3DBtHNAEYe8VLvJ87X+bAlrAA7i9OnSQqmhHDZURRTNLuA4H6w4uqE/WJEdDtfL8th L/Q7lEFDMEwBEkt6pKX9zDQJVatPE233V6f4kbI2mz8/8p83Ny2LDF18JxqYjya+aKdz Wdh552UUWB/lcP9FMwW9dL6ANKuIzRbxLC5PqgNIvsLSDR0OSJajnfovtoAE+fGGjcxo qihg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=XKdTzwkM; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-131638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t16-20020a056402525000b0056e0a471bfbsi1592264edd.93.2024.04.04.07.45.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 07:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@proton.me header.s=protonmail header.b=XKdTzwkM; arc=pass (i=1 spf=pass spfdomain=proton.me dkim=pass dkdomain=proton.me dmarc=pass fromdomain=proton.me); spf=pass (google.com: domain of linux-kernel+bounces-131638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131638-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=proton.me Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6A7BD1F2272F for ; Thu, 4 Apr 2024 14:42:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B65AB1C290; Thu, 4 Apr 2024 14:41:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=proton.me header.i=@proton.me header.b="XKdTzwkM" 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 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