Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp440599rwl; Wed, 9 Aug 2023 17:39:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhe6BItR9KYBPMa/VsfIDKju9Nk0ByblNZrUdzRxjZ/gdtmdpH8UxA/udn3N6q8SyYbCad X-Received: by 2002:a05:6808:14c8:b0:3a7:8a1:9cdd with SMTP id f8-20020a05680814c800b003a708a19cddmr1090608oiw.28.1691627985310; Wed, 09 Aug 2023 17:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691627985; cv=none; d=google.com; s=arc-20160816; b=dnR24SF6o2dLzGS7nfjaM3KA2RXat0YZm/nGa1lv7Rz+Ie+oIYVQKNX/8hrq+riZQI K5TmaVhnFQiN9+XjK+twut3F9igrUo3b1CEBbnN7ONZIo3HHF2QfGNeS9EodHM5MNMmn Js+Tjnc7jCyNS8BBK8YM3p3uDqULH7VBBO+23B8KpkHvF+NX1lsKGCr/Lh2d/YgJ/Jc9 Ki4AffBTCFpr3fNB/SPLUCrOv6mmx0j6O6a9tKdqxD0GqRB4Cr3Ew5mllLNxYk6ikaua wT6z6EgazFQNKaBWTXwbsLN3CGpHHcNUWkEgJitgaAGcN0NIAGVGA7op2hty9hi8pfWz UzhA== 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=HAUCVB9hbx+bm1gCJWJ7NI0D5vTP4KeLZCLHymhDXao=; fh=8BaFkV30SFZR/za2clWhK9KAtA3K5k0A2ebJhQqqR1E=; b=B9+iO2HXFmXEqCNEceTRHqdc196tozrf8A/+qN5VPlR1u0l5YpNUxnu//mhj7jU/IQ jYTbp0L7fYaW2C6jpbxhURHFjCq/vaOSlq+PEHrhXy3ujBRNUD2tbdhJJ7/xBFVy39AY FQhLgDy2YAml1qV9pswh1UIPLFtDTZN8okjeHU0pgjrxH0LxecjIakyiVG+MATjpq4Z9 wFiOVQGKSEhj28eVfEHvBXChNDXShOpgKN/TLzionacyu1ki0fxPnaB32qQSDh2sxuAc 3y348JEZwR7MVxLhLNnhDrSpDb5GBLSn+3ize4e9hxXZzF8WPbUmXBi6ZBdaFA0iwgA2 cnGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=V+ixzXp8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pi17-20020a17090b1e5100b00263fa42fdcbsi2765382pjb.107.2023.08.09.17.39.33; Wed, 09 Aug 2023 17:39:45 -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=@gmail.com header.s=20221208 header.b=V+ixzXp8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231540AbjHIXWD (ORCPT + 99 others); Wed, 9 Aug 2023 19:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231497AbjHIXWB (ORCPT ); Wed, 9 Aug 2023 19:22:01 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA0C21BCF; Wed, 9 Aug 2023 16:22:00 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-583c48a9aa1so4983797b3.1; Wed, 09 Aug 2023 16:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691623320; x=1692228120; 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=HAUCVB9hbx+bm1gCJWJ7NI0D5vTP4KeLZCLHymhDXao=; b=V+ixzXp8y9iFryPiBEr/0UAIfaBTWtRqcmV3Epr223t+BlW+bs9j0UopmLWuAPAjyG qmzAhFYhpoB61/7wMfMHbFx70tFVDNx08ZNekOT8/GE1rKkP2DP+kD3YZlfSP+aUuKqg WTNKlKQmkthTgwEYq6GJNNcoq2gB44mMAJcORwhIWNJXgikdGjUgwaXGLVo4zukDt+zj EjTgO0Dl4Q2drNMKkYtcHmLwVk6UolBPC2g6qumyQKELnmYuHoR58EVEHCiEKXekqzCF d8Vpgh4ueyHv2A0iOYH2PWCnq6UK6RQnzSt1jdOIoRgrHfhW0/+EiMjnGsyzuSHZsQbp Csqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691623320; x=1692228120; 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=HAUCVB9hbx+bm1gCJWJ7NI0D5vTP4KeLZCLHymhDXao=; b=U/hFRAUar4KQhLlNLtF8sVgfPU8qZT8CPrrY2v/JD+43sA7iF/9fu6ODF+o3P330yy zmNNjzoRrv3Ku5f4RwVJ8hnDNyW2V94hSsXsFU9Va0K6DgS9YFlOo+vrk156Qk6hFkRS 9O3SZHN4+vobsZGilNyk3Y7KyRC2GpCpMPRTMsBrqQHNoKpFbYcCseUGTswhpvGUl+17 0D8wzwwTvwcghxjcBpURLDeKzIRlEQrBSGY4fY/MtNsrRii+Da9EkYkM9tI5T9GfUID7 Cv7wOf7mqQ9BPnR7IE+JzTdx2lPRy0NTVNBBdqsL373UN6hX6yunnxIjuzG3zVZaANJT 1LdA== X-Gm-Message-State: AOJu0YyEfwNBvzvQZ0n39Rfxpb9FdxWEzUKm2ABMSADPz7CmZmFZYfUL +twsovHq47xEQqL3MXFrSMPpKx8l0EZwgWmO7SU= X-Received: by 2002:a25:ad20:0:b0:d19:d73d:7950 with SMTP id y32-20020a25ad20000000b00d19d73d7950mr903429ybi.27.1691623320133; Wed, 09 Aug 2023 16:22:00 -0700 (PDT) MIME-Version: 1.0 References: <20230630150216.109789-1-benno.lossin@proton.me> In-Reply-To: <20230630150216.109789-1-benno.lossin@proton.me> From: Miguel Ojeda Date: Thu, 10 Aug 2023 01:21:49 +0200 Message-ID: Subject: Re: [PATCH] rust: types: make `Opaque` be `!Unpin` To: Benno Lossin Cc: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Fri, Jun 30, 2023 at 5:03=E2=80=AFPM 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 Applied to `rust-next` -- thanks everyone! Cheers, Miguel