Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp299685rdh; Sat, 23 Sep 2023 10:50:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFRuNHwxKnrVObSp4BtBvBxK8QAiIhd6bis+qSNQgw+1hG4T/P2xbdK5feG5oZVTTnT6zSY X-Received: by 2002:a05:6a20:6a03:b0:14c:c986:d105 with SMTP id p3-20020a056a206a0300b0014cc986d105mr3348415pzk.45.1695491450500; Sat, 23 Sep 2023 10:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695491450; cv=none; d=google.com; s=arc-20160816; b=kq7zg0k5joW1/SVcpXXYJ4xVXYXmTOMaU5INHdke6w6HxnloQ+k39CZES72cXxiz/j hP8mJ62PgZhJ3Jn6a/fKbZ+w9ZxPt/ytBPVZ9Nc32gfd7nBW21FV/G9ZrqfumCGm3ewO E3twgQhgcC9j8dTIWBUDBd0eWXS3HUZpzi8GKDCx8HwfpCSe8GSOUX+wp6v3xrzORB+S pwmaJlWhyhzQtB0vrfz3mpsfM1lGKWY5WgwxnoeNLjUHGLfWuaIP48ECgeVkS3aoKKXP wpT6/rqAPcRHC5KuB6xKMkkBqSbJju44m/0Pux5BeiCEh2K4KTzJ0FdkULM4NU4HKfFp UG6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=sysCF3eu9Z5ZV58cqPnNNcgJEdP+enFw1r8CDggNwjE=; fh=Cd74raW7dv3YkkvXc+Ivn83Wo7bD2qwQgcydLbvNkw4=; b=d4HqcTk9WX8J4cBXuEoQQvC9Wd973r3klg5oLwHsMiDpdKKX2pcNRuWSi6tWbyGyfh vc2jfVN/sAwNcZV4jR14BNRYh9q1NrLpnvlp6NGpw73d1CX7m9yuta3GXQSAcEi1t/1i 0qlyiwsD2bkzHdxdF05qo0UcQc58ws40Pdi8QL5ZUuRsmvxFiP9GkTGAW0eZTEol6Qod WoAbKAMEG+Ud7ls82z3yAqcdHqeAXAl6gwnzoZDG+UXeNi4a4tVPX/DpQjeqwl3UhBnA 4r8qWnG00eL2a6KyGl+cIl1z2d2xT41910+6XZy5MNq3cdvrQbSAtzhimCU05NAoTpJA rBEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RDVss8oL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u17-20020a656711000000b005657ba564bdsi6374378pgf.826.2023.09.23.10.50.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 10:50:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=RDVss8oL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AB6588347A7D; Sat, 23 Sep 2023 07:07:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231307AbjIWOHp (ORCPT + 99 others); Sat, 23 Sep 2023 10:07:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjIWOHo (ORCPT ); Sat, 23 Sep 2023 10:07:44 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA1231A5; Sat, 23 Sep 2023 07:07:36 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-d84c24a810dso4344527276.2; Sat, 23 Sep 2023 07:07:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695478056; x=1696082856; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=sysCF3eu9Z5ZV58cqPnNNcgJEdP+enFw1r8CDggNwjE=; b=RDVss8oLWPBnaZ7ETO/SosEP6LWEvQSd7nVBA4F0ZWjNDWf2bu2p6ZzXEFdGlltZJo rqOYtqEU4BoOXVfMq1Z+2AASC5cbj7eOFrEmfVI8owOtn9kD/Q2sZgai8awwYYNEcNbX rkOQawtVjccF7RAdIq68WskmakvbQ0GTCuhavJ8Ixq+9UWpG/AZrfLWJMiAGcwzXLJt4 ExPDipUBM/jJMe67fPa1i7WEzs8dUvlOPtqUe1Na3EiLs2bmWJK9yfWgTAzq4wG+l+jO XXFGxn/r07k7MzKMZ4Eh8SQnjGFMhUc1tlDJOWSX2fW2P4eN9Ksv9PCJ08KzXa9km27K 02zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695478056; x=1696082856; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sysCF3eu9Z5ZV58cqPnNNcgJEdP+enFw1r8CDggNwjE=; b=UBhK/8/sHfUkRG+SknbSPh9hOZagg2xUUAIzOvYF4YYmTDxK5i+hdkDzURMyJnnFWB d2EhNKOpTIkOL7t64PU1zbjB874Lvt6Bkf/VHacfKnAc3lDGHlY8zrhREZiBcodqisjE Zl44Ml204CUJ4LWL9MiUJsHR33Bs/3Owk0xt2sr2HIl1mQzcUVEAH0FuUb/dyyapNqtA F9I7BrPV8+n0YIv98Wa5iZd+A1grySK4MiGQ/Hxv1sFC+2aYFY4tFjeYCz39kTup6MrQ /hkARFhDSXyeYErQprrN5UzmZU2qUxiG39iQnajTSGJy0iYltXom+TExIOXj1ONCX48+ U3Rw== X-Gm-Message-State: AOJu0YwINfdXTvVvMF18AL15GVr6OXf9aejPTIx7r3+jxbg3v+EFHNuk jg/zUI6fnqWayFilmeJL77Tf+rz6GH6qOwd/PWQ= X-Received: by 2002:a25:b11c:0:b0:d81:a0c5:f275 with SMTP id g28-20020a25b11c000000b00d81a0c5f275mr1675201ybj.15.1695478055798; Sat, 23 Sep 2023 07:07:35 -0700 (PDT) MIME-Version: 1.0 References: <20230921213440.202017-1-wedsonaf@gmail.com> <20230921213440.202017-3-wedsonaf@gmail.com> In-Reply-To: From: Wedson Almeida Filho Date: Sat, 23 Sep 2023 11:07:25 -0300 Message-ID: Subject: Re: [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef` To: Benno Lossin Cc: Alice Ryhl , rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Andreas Hindborg , linux-kernel@vger.kernel.org, Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sat, 23 Sep 2023 07:07:46 -0700 (PDT) X-Spam-Level: ** On Fri, 22 Sept 2023 at 16:50, Benno Lossin wrote: > > On 22.09.23 17:29, Alice Ryhl wrote: > > On Thu, Sep 21, 2023 at 11:35=E2=80=AFPM Wedson Almeida Filho > > wrote: > >> > >> From: Wedson Almeida Filho > >> > >> With GATs, we don't need a separate type to represent a borrowed objec= t > >> with a refcount, we can just use Rust's regular shared borrowing. In > >> this case, we use `&WithRef` instead of `ArcBorrow<'_, T>`. > >> > >> Co-developed-by: Boqun Feng > >> Signed-off-by: Boqun Feng > >> Signed-off-by: Wedson Almeida Filho > > > > I wonder whether "WithArc" is a better name? After all, arc is short > > for "atomic refcount". > > I also think it's nice to include Arc in the name of the type. > > I think `WithArc` would be confusing, since `Arc` is the smartpointer > that points to a `WithRef`. I find `WithArc` confusing as well: is it a `T` with an `Arc`?. And I agree that with Martin's point that it being in the `arc` module should (although feebly) establish the relationship with `Arc`. I'm not married to the `WithRef` name, but so far it's been the best option I've seen.