Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22564251rwd; Fri, 30 Jun 2023 09:31:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlH5dPJuye28gagWalax/639zpVzTow0Rf76e/etSJH3Sg+WFFxxU598DQwdJznkq7CWT0eD X-Received: by 2002:a17:902:c94d:b0:1af:bbfd:1c07 with SMTP id i13-20020a170902c94d00b001afbbfd1c07mr2052196pla.57.1688142666599; Fri, 30 Jun 2023 09:31:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688142666; cv=none; d=google.com; s=arc-20160816; b=fdj8oNhHhoS9p9ED6AALfB8XZYeT4btOlzHVpJOpbQlVkyR9PzHoGfiOLe1sEERbU5 O0IVbguXRMcvc97li/LOXE2dlJwA8bpWon+qgbergNMV/Jipd4NobBem2/QR0g3aXews xyOsTrGshdQVnlV8tKRQtGiBjwGwdTwf4VqWhW/oQrzBbDVCtWLWRu5SED10JdzohX/U xDWy6tEQf5r+hvG1VVkoPXQwkWtotsZwQ9NfC8bgxLDSNiT19O0i7tcnmfDFr/Mi8LrD vE0ogpfFqWtVyQ0x//fYXG6upO3sdy1CF7cTfjaWPGDHBqL9jhuwKXNd18C3Ppydj01r plAg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=hhBomBeAlOmsPL3qCHSlVfZmdBVSngojM0t0AkUf/oY=; fh=Kfa0GpPRIGiqh+Vf1psP9M/qsDxsmazFiEm9sVeFttw=; b=cg3lHzOvSCRfKjZdfVJU5KCAfOjlqKglHTabRcB5JU9zEXVDjRott/Homo27lqKRqv RtBYOt2TPMzmGnm9ouD5hsuPSlHXuwi57nAGrdbL62BOAFdAHbOmXnqN7XXtu5rStx7G vqIPCz27lTOUxmGM2hXmi2/P62e2H89z5rmRu+wnqY/Xsf/C9dXmbqf/zgHb0GRYp4pN am6SqlcEo5XkkO3rXlZMNgDC4D9dZtRrVQGKa3IId7DIH0ejLT2PhiLTQYYZtRG/fbv9 sys3+NhdJqxZyopzxYyxeUHWLPzEZXRP3NR9ww+FoSnJ3gQZSFIMEdoorhewDbzCrF/P niLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ryhl.io header.s=fm2 header.b=X9J310ee; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="gM5/CB7K"; 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 m8-20020a170902db0800b001b0603829afsi13728709plx.405.2023.06.30.09.30.53; Fri, 30 Jun 2023 09:31:06 -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=X9J310ee; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b="gM5/CB7K"; 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 S232825AbjF3Pfl (ORCPT + 99 others); Fri, 30 Jun 2023 11:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233159AbjF3PfI (ORCPT ); Fri, 30 Jun 2023 11:35:08 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20DD41B1; Fri, 30 Jun 2023 08:35:07 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id ECDEE5C1D56; Fri, 30 Jun 2023 11:32:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 30 Jun 2023 11:32:58 -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= 1688139178; x=1688225578; bh=hhBomBeAlOmsPL3qCHSlVfZmdBVSngojM0t 0AkUf/oY=; b=X9J310eeZDjBWSv3x9bGvUYm6RSBDvVnQkm3AgoaiNmTSjazQ+0 u61SPv8b4QmmmaDu3cLHR0QF7UkLBfShoRTMXdwy36uQelIYu22ou6Lqtru6o1zz eNqjI1CRa9eqlsJI67t3+bUV2zaZnZ91aRsDcppoKgb3aRooAG+yT8cgCU0RHUmx C8INgfwLw4qEfTyiZCNP3OlkJ8y+4YAiglAkbRPi3BWSkuDvGVBUCPb0ykSmDxWr ErmKFHkF6sxxHoIncH3RBC0SxIAsNgfjUUEUkQ2OmPPwJF2m3jJrEXciuC4iVTMK PdDqYymKPdIMFYIQX7Kqcm09vpKOqOIvpXw== 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= 1688139178; x=1688225578; bh=hhBomBeAlOmsPL3qCHSlVfZmdBVSngojM0t 0AkUf/oY=; b=gM5/CB7KkpABu1vzt1euSdFBywQmG+sEehJNJgFbgIOXbN+gJ1s sm04k4BvgGLiQF88ElgjNzufy4RuRYNZxT6S/NzKIsMdcnbJqPKoaoqUaRSe776T zZ2i1OPul+ACzlGTwpni08oMCZ/UMyro6h56a5lyCVSQSD18tEAK2NO7xOMQxWPf +VVTsEOuz7+VBIip3gIq5oA/tyPAZt2hvUbyHw78SfWCrF53+CJwDmTdBSqcOTiG d3+Qdq9Tb3KscXiRoa0Z9c8iOTxN0g09n2M9EA24LO41JsVV3tjHse6LwO8hd4u1 A2oGBSUEtmEOdvrk0XP1w2l+YvypeEH9JcA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdeigdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheptehlihgt vgcutfihhhhluceorghlihgtvgesrhihhhhlrdhioheqnecuggftrfgrthhtvghrnhephe duuddvteekvdektdduledugfffhfdugeejgeeuvdevtdetveejheehiefffeegnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlihgtvgesrh ihhhhlrdhioh X-ME-Proxy: Feedback-ID: i56684263:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 30 Jun 2023 11:32:55 -0400 (EDT) Message-ID: <11c59308-1842-13ba-0945-a68e79d079b8@ryhl.io> Date: Fri, 30 Jun 2023 17:32:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] rust: types: make `Opaque` be `!Unpin` Content-Language: en-US-large To: Benno Lossin , Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor Cc: Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=c3=b6rn_Roy_Baron?= , Alice Ryhl , Andreas Hindborg , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev References: <20230630150216.109789-1-benno.lossin@proton.me> From: Alice Ryhl In-Reply-To: <20230630150216.109789-1-benno.lossin@proton.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 6/30/23 17:03, Benno Lossin wrote: > Adds a `PhantomPinned` field to `Opaque`. This removes the last Rust > guarantee: the assumption that the type `T` can be freely moved. This is > not the case for many types from the C side (e.g. if they contain a > `struct list_head`). This change removes the need to add a > `PhantomPinned` field manually to Rust structs that contain C structs > which must not be moved. > > Signed-off-by: Benno Lossin Reviewed-by: Alice Ryhl