Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3019049rdb; Fri, 22 Sep 2023 15:44:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOHz0UNtcihifiLy6lkkFEkNvqrza1fGPKdnzcKhspTG0ciMbYqbfGiDhQKck7f/W5FljM X-Received: by 2002:a17:90a:748b:b0:274:60c7:e15a with SMTP id p11-20020a17090a748b00b0027460c7e15amr869999pjk.4.1695422698940; Fri, 22 Sep 2023 15:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695422698; cv=none; d=google.com; s=arc-20160816; b=r0zOoNLhpNdN0rIlCWpihPTgyeRqrSt8xcCyb1NqjnyrkjdOZ9jITNDjWD7xkexZ+s FzaQ1yLyTvClF5mpWDFb4HSnLJXWDlXJTU+9CK/cGMX1HjI9AQ8R2nVShwW0R5hdp35p lmRoJ2s5K6O1bST7D1JLGleGE2x6hW3myOETBQrzVKEQavRcYhkzA7ViCqM718seN14e jPzXLaC20hyhIKpJt+1H3WXn1j1RZgK7L5pO0nBgxbUdcbiUehTPsLoPxcHdDirTs74u GGE2YehaG4HTgoQQeOtIWCC95xLxBMRgrQL81k89+mk+5VAs+2qSyRSzR/AL0DrLnsET hYlw== 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=vy/RfO3zn4ylyaZcM6jpLeM6PDtn4HoNfcn9A4ihbHA=; fh=t/sjeKs3jDUVnpgQ/tAkLOUZ0fhoGCVITqIFPNqX3gA=; b=R2VRo44rcvEPUYaWjkNsicT8MJK4vaEgziXvSWRLruko75fyY/R6vLsIqZD/f03CjZ kSrQFaNDGiQVhbMJkPWzvy4Y9aeTSA7Iw0CAdWUcHfQvwuFPxL6Vm4GHx2oYFO2buCM5 sPW0mlFAIlOCKJXF7QgvlfS9vQk4pEC34JGThh0bEHnb0wAxoYJxWCeTVrzQD49hsl8Q YDIQwNTM9Yrn837DrMsdiPfJ+dFRECcHD21QfIX6XjdkOei/BZ6UcOSrzHqF2W9nPFg0 kwW+Hhi8Zmu7YxjyyvVgwhDgTKa3KqFRanc1U37EEVOrB+AHvn5xPdhEGUKsOdJBW0sD +Rmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Vha+qa6n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j20-20020a17090aeb1400b0025359a570fesi4634005pjz.19.2023.09.22.15.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 15:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=Vha+qa6n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EAB068217EC8; Fri, 22 Sep 2023 08:30:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230484AbjIVPaS (ORCPT + 99 others); Fri, 22 Sep 2023 11:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229849AbjIVPaR (ORCPT ); Fri, 22 Sep 2023 11:30:17 -0400 Received: from mail-vk1-xa33.google.com (mail-vk1-xa33.google.com [IPv6:2607:f8b0:4864:20::a33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12CBDA3 for ; Fri, 22 Sep 2023 08:30:11 -0700 (PDT) Received: by mail-vk1-xa33.google.com with SMTP id 71dfb90a1353d-495bcd861ccso906372e0c.3 for ; Fri, 22 Sep 2023 08:30:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1695396610; x=1696001410; 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=vy/RfO3zn4ylyaZcM6jpLeM6PDtn4HoNfcn9A4ihbHA=; b=Vha+qa6nvTcf7jlLZcZKBB0HhXbk9nREif1xvvXOH3wSTl9W0LpbEH3CskBG5lRtrv Lu0h7asrshqLz2FACEDC/HqqE0vPLuknu8tQntJe76bSkAVEGhuEnp1uK9UbkoSiU8L9 FRdfYOmgdUUYQj4svMHTzByRhOF7vSTrWr+Zqe9wiZ4mSWXuicTJYKDPBlDm1gsN08w7 z2/7Mfnpnh6QLhzF2aw57ttNOa1wDVv4evE90yLCCZS5Jslb1+HpW83kRUIXJaZfnxZq riX+NjLFND6LADQK4F6NQsmYWU2Nmo/ddStMRdE2960PIbqYwKmll3GteWNc0kH5Vxsv CSKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695396610; x=1696001410; 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=vy/RfO3zn4ylyaZcM6jpLeM6PDtn4HoNfcn9A4ihbHA=; b=K+N+1g64wU8/g4xT+zHl0WDTk1+4q395dPzfjALNTGrcxA17Cm7c1PkGBT4ul77Y9v Y1jdMLXQOPEM1SnOxBeTz+KxC66431pdVqHMcUqo8NwUPROhX5tX7WVmXhwCLysM5aoA 4bH0RInKz4MkaOJHFNrG654sdgKnAlKnJ8uUllErtZmmy3om5I/N1rJRvb25Pp7TOTNg Lxetb/x+1WsDuFJ4Td/ZTyippC1ncI+XhJ5NrE7QmxN52/nX2oy0tIJGRsKyW6Gq0TUQ 870DT3TOvSGaxeX+xIxDMudRBlRdA32fcX6sux3ehd3O5e7aBAGROCZA9XHv6Ne8Xl0k qdfQ== X-Gm-Message-State: AOJu0YwJt/Xf6LK40tLuHqwsyMwfkcaD0e2yALqUJsjVDF/DIrak0OcL u73F7Yf8OPZLnfv21B83f8wDC+Akv+BMxsws2mNklg== X-Received: by 2002:a1f:4fc7:0:b0:488:23bc:6d0f with SMTP id d190-20020a1f4fc7000000b0048823bc6d0fmr7395023vkb.16.1695396609288; Fri, 22 Sep 2023 08:30:09 -0700 (PDT) MIME-Version: 1.0 References: <20230921213440.202017-1-wedsonaf@gmail.com> <20230921213440.202017-3-wedsonaf@gmail.com> In-Reply-To: <20230921213440.202017-3-wedsonaf@gmail.com> From: Alice Ryhl Date: Fri, 22 Sep 2023 17:29:58 +0200 Message-ID: Subject: Re: [PATCH 2/2] rust: arc: remove `ArcBorrow` in favour of `WithRef` To: Wedson Almeida Filho Cc: rust-for-linux@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , 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=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 08:30:18 -0700 (PDT) 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 object > 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. Reviewed-by: Alice Ryhl