Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4884804rwl; Mon, 3 Apr 2023 10:59:21 -0700 (PDT) X-Google-Smtp-Source: AKy350ZY8Xy4a95Oi3MPG2bf/wr7RGaZBeqzuLXn5z/frPqeyP1PiF6m8vdFgXUaz3foncYqz44q X-Received: by 2002:a17:906:2759:b0:930:8fd7:789f with SMTP id a25-20020a170906275900b009308fd7789fmr33967828ejd.38.1680544760861; Mon, 03 Apr 2023 10:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680544760; cv=none; d=google.com; s=arc-20160816; b=ZI9LqI6Y8jBgShzDebQg+7OPaGQ5adKf1NedvaPW2TCcfgy28lQ8EmelVNd8C5YO68 Hw/9l2jxMust95lBzVEdYYEVx8Qczv75mI40CvmxTPlkYA6Bkg8CTAm//pfHGEFtq49i QJIUyuzyNTC9tQo4EZ+56jpirUk+9pSuPE3K3he/MJ0RASIHz+z5LxW3fd69/UkBIO+u tvwNlzVgetCtpIvWd1aG5n5IwHQVrxzrsm4Ud40NoBJMSvAOIay4iRNnyfQPOiE7RX09 Iw68moQe4XLnvD0csIFd8maRJF7dei014HxH1uswM7oDvq4Jx4M6OzbCxjgbrTjQzE4i Lfbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:feedback-id:dkim-signature :dkim-signature; bh=Fj6jwtuJwwXDKnuKOZE2jK35xWn0Haj++9rGqO2GEwM=; b=CKup4YaNMnt7J3H4MY82ZadKHGOFaV3BhU1yP+7tyH6reQSRsr3qB+ski4u++kDHrR HvpJr2Ic0KpriuqZuggMyuCISzZJCAPM1XzhoUh7TdtDcrKwT0Fr9mIXBcEcZowMTx/U yfHL9jdGk2RI3q742P6WtYwHoTSdl1Wr136Yzyr9jyN2c5DbsTxJYSVbrvoqMHc/5lIU 4KY6T/FuWBZ54hBN7L2qvILNztaefY54Rtfvw69PHBZuO7ULdRAiEO3Lqi3HFzPlfHwu 8nV2w/X90oX1z7wd3XEj1xfaWMY6NE7QpInJ7jETGvXvnQZ9Pwj/AKxlwMNPQqrp5/Gm 495A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm2 header.b=BAZHys7R; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=UaZ8qLNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ryhl.io Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a170906914300b0091d98c32ad5si7250110ejw.702.2023.04.03.10.58.55; Mon, 03 Apr 2023 10:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm2 header.b=BAZHys7R; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=UaZ8qLNT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ryhl.io Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbjDCR5t (ORCPT + 99 others); Mon, 3 Apr 2023 13:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232967AbjDCR51 (ORCPT ); Mon, 3 Apr 2023 13:57:27 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95CDA3C30; Mon, 3 Apr 2023 10:57:15 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D3F1E5C01B0; Mon, 3 Apr 2023 13:57:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 03 Apr 2023 13:57:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ryhl.io; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1680544634; x=1680631034; bh=Fj6jwtuJwwXDKnuKOZE2jK35xWn0Haj++9r GqO2GEwM=; b=BAZHys7RbRPdGlIJk/oh4D4cTsgBFojioQzpjsnMMlfApqULNZq aVN8z9sPPj3McNCxNQy0edHaEI27x7buyh+QJbpkLkoUND1cCoq0CabAeHxn7UX8 0pGOA2LK8dUlAtEMTNRA8qVp8rQxFeWLajrqz0kR5JrrcWzot6dM0UsOuaEzUUHX tDk7f2NLtRknHlnZK/+xEoGQyGcIZ6bnq7/MpSdadnBalt3Snygfk7IUteCFEEj+ /yTSHGyQPEcUP/x77HdMjwrtieu4Dt1wNg6ozNewpIl2lHoeao4QuNOwYa/bWQcl /0XKhbgapv4AEx2AxMmES44v3a3PRHKROQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680544634; x=1680631034; bh=Fj6jwtuJwwXDKnuKOZE2jK35xWn0Haj++9r GqO2GEwM=; b=UaZ8qLNTDdE2z5DALS14TvH/SqRfki+TAKLBkrKVjWl7+ee5+TG iCz9npHAt2OV6b72blpMFRKQx9MJgjfMmNbJKGxkVaUK+Mxjgamf6W7/jlGR20kT SSmsaQrKEjMqIgYVbxcr6+U6oeNNvHnpaqAZVzWKvDrXRaO2TRSJ478lf0h5XJOM cpTbqKqNV/f/Rx7Hooef2wTL0mPeM4QmkKozymLmIVK1+pzSQ8c/qFlS2ZJBOJnH UbF/vj7jT+kP2IZUoMfEbZ4LgRA1XWIGUD4sZGozTYxDCTbage0HXA308pyDiQ/l GpaCII5MTFO6WdPfgEoESyyEzKr1M39Bang== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeijedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfhuffvvehfjggtgfesthejredttdefjeenucfhrhhomheptehl ihgtvgcutfihhhhluceorghlihgtvgesrhihhhhlrdhioheqnecuggftrfgrthhtvghrnh ephfehueeileevjeefkeetvdffveffudeuhffgtedvuefgiefgiedvjeegvdejleejnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihgtvg esrhihhhhlrdhioh X-ME-Proxy: Feedback-ID: i56684263:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Apr 2023 13:57:12 -0400 (EDT) Message-ID: <2dfbd9ff-3aee-2fb7-8701-c03bd12c090b@ryhl.io> Date: Mon, 3 Apr 2023 19:56:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 From: Alice Ryhl Subject: Re: [PATCH v5 09/15] rust: init: add `PinnedDrop` trait and macros To: Benno Lossin Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Alice Ryhl , Andreas Hindborg , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=c3=b6rn_Roy_Baron?= References: <20230403154422.168633-1-y86-dev@protonmail.com> <20230403160511.174894-2-y86-dev@protonmail.com> Content-Language: en-US In-Reply-To: <20230403160511.174894-2-y86-dev@protonmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=unavailable 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 On 4/3/23 18:05, Benno Lossin wrote: > The `PinnedDrop` trait that facilitates destruction of pinned types. > It has to be implemented via the `#[pinned_drop]` macro, since the > `drop` function should not be called by normal code, only by other > destructors. It also only works on structs that are annotated with > `#[pin_data(PinnedDrop)]`. > > Co-developed-by: Gary Guo > Signed-off-by: Gary Guo > Signed-off-by: Benno Lossin > Cc: Alice Ryhl > Cc: Andreas Hindborg Reviewed-by: Alice Ryhl