From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 018E7EE49A4 for ; Tue, 22 Aug 2023 11:48:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235330AbjHVLsd (ORCPT ); Tue, 22 Aug 2023 07:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235312AbjHVLsb (ORCPT ); Tue, 22 Aug 2023 07:48:31 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D4A010C7 for ; Tue, 22 Aug 2023 04:48:07 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-4fe8c16c1b4so6666028e87.2 for ; Tue, 22 Aug 2023 04:48:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=metaspace-dk.20221208.gappssmtp.com; s=20221208; t=1692704849; x=1693309649; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=uhIrFon087E3iYfZNnOqwEsuA1QGwXh+7swXilo4wNE=; b=MYo+yKWLa81z+XWwwjzVYCoI07QUk84F37CFOstTIT0Olw3mmnSPMI2BwhGVAuQeib IqXlcYHpUDLDUko026HKd4AcSIeqtPooSaGhK2A88c0S2uw3UTdvlTIB+kO13CRZtB5P Mt1g72j1MQ5ircxEomxpjmSKXlbFRrvKTnEipwqfc4LN+oCJNQqGD0Dp6COdIJYhWna8 xMHA7oSXMJco9TrwMuOlyqiAN76cwHuRfol0uGnMVUI5OhpaWc6H901blMfKJtbMMK76 8uCmpeBYJBZdWhDEFgtuYEyG7LaGxEVK1rLNh6lduuwPisotDTc8aga/MzfxGGG3EWO2 uzlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692704849; x=1693309649; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=uhIrFon087E3iYfZNnOqwEsuA1QGwXh+7swXilo4wNE=; b=CCs4dl+VZijXNjjwbDds9VeP4njtCxTO6T1HUemjzhlB0d/B8gWHdrxHZQ8LLwFyJ4 FUHL+e2cQHUDU3mwxzPGZI6K1a6Ivp1z6qhMEoCMlJbCA5ZIasjTR0VOfS62a8eMDtR+ a+dRSYzQL9Vr/8X9Vp+GFXSRNG3qH8+zViaMbbbZgvga2dp0ydfqvDidcB1mBu9r0+k1 jkMZRYyhQz6g8Vw2+/uHsq7yg7EwS2HJ0AQM6ncYCXMqUvD6LuBXS5jf+i1DsEbEryMK xHN9lzLmGpEhg3UHLr4DyrWXB2xHok3ACr3eUvmC+ojUMyUodx9VRNZW2jsKE6re7xmK puKw== X-Gm-Message-State: AOJu0YzKf9iWaT51VLBDkr+GoZLz5EWgdEnoQPHlMMvxM1vP3MuIQm/S mV5jXpOgY2w6U7TGWvnyny4ejw== X-Google-Smtp-Source: AGHT+IHuAzW/pPPxCGL04jOEgbZm7KqKnU9xn7BXSLzQzVo0ZR2moNYaGphImjz9x3L1vE52LMDqRw== X-Received: by 2002:a05:6512:3b2b:b0:4fe:1bca:d921 with SMTP id f43-20020a0565123b2b00b004fe1bcad921mr8573241lfv.21.1692704848653; Tue, 22 Aug 2023 04:47:28 -0700 (PDT) Received: from localhost ([79.142.230.34]) by smtp.gmail.com with ESMTPSA id o4-20020aa7d3c4000000b005255991c576sm7424753edr.66.2023.08.22.04.47.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 04:47:28 -0700 (PDT) References: <20230711093303.1433770-1-aliceryhl@google.com> <20230711093303.1433770-3-aliceryhl@google.com> User-agent: mu4e 1.10.5; emacs 28.2.50 From: "Andreas Hindborg (Samsung)" To: Alice Ryhl Cc: rust-for-linux@vger.kernel.org, Tejun Heo , Miguel Ojeda , Lai Jiangshan , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?Q?Bj?= =?utf-8?Q?=C3=B6rn?= Roy Baron , Benno Lossin , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Wedson Almeida Filho Subject: Re: [PATCH v3 2/9] rust: sync: add `Arc::{from_raw, into_raw}` Date: Tue, 22 Aug 2023 13:46:56 +0200 In-reply-to: <20230711093303.1433770-3-aliceryhl@google.com> Message-ID: <87r0nvs3hu.fsf@metaspace.dk> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alice Ryhl writes: > From: Wedson Almeida Filho > > These methods can be used to turn an `Arc` into a raw pointer and back, > in a way that preserves the metadata for fat pointers. > > This is done using the unstable ptr_metadata feature [1]. However, it > could also be done using the unstable pointer_byte_offsets feature [2], > which is likely to have a shorter path to stabilization than > ptr_metadata. > > Link: https://github.com/rust-lang/rust/issues/81513 [1] > Link: https://github.com/rust-lang/rust/issues/96283 [2] > Signed-off-by: Wedson Almeida Filho > Co-developed-by: Alice Ryhl > Signed-off-by: Alice Ryhl > Reviewed-by: Gary Guo > --- Reviewed-by: Andreas Hindborg