Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1016656rdb; Mon, 19 Feb 2024 01:06:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMxkASnagyIpnrhXd83XnOlY2eT1rmXag+ZABpOsQxJkSKrO9y5vhna8QGKFUKMGMNz6TyOZWrCEYsmMMhNM+hPmYzVd6XhsErqfJE/w== X-Google-Smtp-Source: AGHT+IE5BMeE+TpEbf4N6Oi4qVDC0UorpH4DXlAkoBP1BdlgfteYP+2LmWIAWHY22VdjJB0BDXbm X-Received: by 2002:a05:622a:170c:b0:42d:fa21:2933 with SMTP id h12-20020a05622a170c00b0042dfa212933mr6029071qtk.0.1708333609080; Mon, 19 Feb 2024 01:06:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708333609; cv=pass; d=google.com; s=arc-20160816; b=n72jwxIlaHBgx+4dCnP1amyxJDT8IaSHwn1t+1RxrNoaub+APcYFA9Fc48HlE6YXF/ toAManlPZlvh8MMhCOeqWoY7H4n61fSvGPq0Y1C78B8/AS65QfT1NfhSFZOKDgV+kxBS fxBPxD2DF99B2btR9G6mUYh/9K/iYQ422EB7HHcyNRbJAy9ciCruDxAYj1l+uGSzxGLj xWR2yRZAUK/CTDMf4Qhsk3vFQcjC6/HsaUXgt7o8xuVuKPQ2HxeMcknJW8Ll3rRQDCrn rPWG7Q/1nHctz9vHDDLKxgD3WHTv3lCcqfT17wcLAWz8MgNb+7OLkK85peSpNyfYoP0j RePw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=xpY3ZmKzm5W53U81GOab3gbPC2jYO9O/nb67la/7GTs=; fh=IJi9FwUUzH+8IeG7CS7vrhqCZt/ZZ4mFuIeUM+hEkJc=; b=p1CESy2ZtPj0l7rW6MM0da++wzpoferzgMPv7223sF+Nf9sHy86BGik84EjK7MITnH kZ+FZ6uzfjtREPAss4z5rMNi9/ApWXnuArzS+5vzTy7ALskqNzJ2mLsAekRbh4O2pg+h rVxjRcniHzkHpXNOh6USIRLFedzugzzNArqrfdYxCGOQd48rAUqJ3YcvXdwkPwKMl/ld Fy9bh39HmtfjMv8068GDEeprM3ag7H6TxP44DT78zROKnZCOITEmk3FL/4UKaqjvRIcv DumL/xfT5MS/gn6QxZtwlTY2cMAbe7HLste4H6wSagcUAjptE1O7AK6fdEGUHVlKiI2R DuPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ApXLLN4S; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-70999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r8-20020ac85208000000b0042e00ad1e22si3603282qtn.95.2024.02.19.01.06.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 01:06:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=ApXLLN4S; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-70999-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70999-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B55891C21A37 for ; Mon, 19 Feb 2024 09:06:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C48825567; Mon, 19 Feb 2024 09:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ApXLLN4S" Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11C762555D for ; Mon, 19 Feb 2024 09:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.217.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708333564; cv=none; b=HuZAeQa4JeG0697CrueNxNmm2f/uH60L0SRZVEnk6mQSqTgKFX7itEKSxW1wOo+1Sv5TaU7XysNMVE6ayQNPj5bO2i42NCxtA2Cw3yn+/rBcMG9Flm9Oh5WnwC5AAf6ehi64RP2+HOn4+JaInoNxIxlfzq3uiiKQhzKdXRmxuTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708333564; c=relaxed/simple; bh=xpY3ZmKzm5W53U81GOab3gbPC2jYO9O/nb67la/7GTs=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=h2VqoWbzNpyn4Hs/fG5EVZ8+FkMax273V7qRoJsU8+w1p0Ak/AzJlXzAMcOCL0DZoWMqLFusdnNcZlfZHB8a8eqV2oHUVLgp0DxPmUZyC/LdcAvzjSERj85oouBNym0GJ9sY5s9236VeNzIfW3ScKqlmhd0zhPEd2/ySXE/Dgy4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ApXLLN4S; arc=none smtp.client-ip=209.85.217.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-47044462962so41830137.1 for ; Mon, 19 Feb 2024 01:06:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708333562; x=1708938362; 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=xpY3ZmKzm5W53U81GOab3gbPC2jYO9O/nb67la/7GTs=; b=ApXLLN4S3mDbrHTU/U2jLnKEz6wz4Nl/9kO76lpoyykaKLqeJ2QUJgqoTC6+DGqQGC F1GRnlNib6EicIrvLa5M/1fAiQr50/GLv24REdNFVOtLkpDxprBVWN6KddkHCqv02Qri l9ADWkZM6TEBu1WIVqKHu0tr+NldrFThQgSHPtx5up2m2h6Cfr0gE+gWuoTE6JrgP+N0 J1kfBiGX7mLVInXiZ1a0JqiQXiMp5FSDRuRI7s4Aj2RDXfanYaWsEZG6273atdAm+0YB lHB3qsOErY3qfCaOyKt6HI2Xnr/pXTu5yhDvXFsOKjapm29a+fednO/T4wDT37wMry/w dQRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708333562; x=1708938362; 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=xpY3ZmKzm5W53U81GOab3gbPC2jYO9O/nb67la/7GTs=; b=FIPofy4x8AgfswSOcPdy1+YDqfl7xU7dW++L26uW3t4u4aTxtWgq38Tm8FB7RW3zH4 4B1Dak16sVLXBhjVuFunVTRPLHQEvE4dV0McxpMbsAXqZC5P2edIhx5gjkj0kGMHEez0 lU4eK64NAGEb+7pijVWIYPogfdq+cjsvZOQ9vn8XGUIwbsOQtqiqNZguYuTio6Q3Od47 1b6HyFg3O5ir94pNchIT8zDCdXqCLSeu6VZtqLEGJEh6bC63P4DP5Mg9XEOWXtX9G0c4 1egIX8Bdy13oQNs5Ir+1ceqPyIhiRd8cJanwGWFTOg/As6lYUOz+EWCl7oMIaZnDXaxi AGWQ== X-Forwarded-Encrypted: i=1; AJvYcCUz07tCLUEAIopUH0ZarFUVMnng7Oe2mTaDuuz11jXJuyVtmVQ0j6c1G04lpq8igtOez3KbvNhMNFkxkEQk9PCb0DJtPRC9R/Ti7pOd X-Gm-Message-State: AOJu0YybPHZ0IgMNqfdBwwWYA82q4U7xz01g72QFH9EySaDSZp4kC5ax v7z2YXFecd3Eg6zeF+7A9kR3rOLPx9VxyqJIrcUZ9XBALWVwn33jp4bmXTaSt8SPxIIjIUz96MF nl6VzNZ1WTkXMzfcccXAvhXTlfTw5Er95VuHS X-Received: by 2002:a67:f3da:0:b0:470:4510:eda8 with SMTP id j26-20020a67f3da000000b004704510eda8mr995388vsn.21.1708333561626; Mon, 19 Feb 2024 01:06:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240217002717.57507-1-ojeda@kernel.org> In-Reply-To: <20240217002717.57507-1-ojeda@kernel.org> From: Alice Ryhl Date: Mon, 19 Feb 2024 10:05:50 +0100 Message-ID: Subject: Re: [PATCH] rust: upgrade to Rust 1.77.0 To: Miguel Ojeda Cc: Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , 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 On Sat, Feb 17, 2024 at 1:27=E2=80=AFAM Miguel Ojeda wro= te: > > This is the next upgrade to the Rust toolchain, from 1.76.0 to 1.77.0 > (i.e. the latest) [1]. > > See the upgrade policy [2] and the comments on the first upgrade in > commit 3ed03f4da06e ("rust: upgrade to Rust 1.68.2"). > > # Unstable features > > The `offset_of` feature (single-field `offset_of!`) that we were using > got stabilized in Rust 1.77.0 [3]. > > Therefore, now the only unstable features allowed to be used outside the > `kernel` crate is `new_uninit`, though other code to be upstreamed may > increase the list. > > Please see [4] for details. > > # Required changes > > Rust 1.77.0 merged the `unused_tuple_struct_fields` lint into `dead_code`= , > thus upgrading it from `allow` to `warn` [5]. In turn, this makes `rustc` > complain about the `ThisModule`'s pointer field being never read. Thus > locally `allow` it for the moment, since we will have users later on > (e.g. Binder needs a `as_ptr` method [6]). Maybe you should just add the as_ptr method to ThisModule now? It will silence the warning, and doesn't trigger a warning of its own since it is pub. > # Other changes > > Rust 1.77.0 introduces the `--check-cfg` feature [7], for which there > is a Call for Testing going on [8]. We were requested to test it and > we found it useful [9] -- we will likely enable it in the future. > > # `alloc` upgrade and reviewing [...] > Link: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1= 770-2024-03-21 [1] > Link: https://rust-for-linux.com/rust-version-policy [2] > Link: https://github.com/rust-lang/rust/pull/118799 [3] > Link: https://github.com/Rust-for-Linux/linux/issues/2 [4] > Link: https://github.com/rust-lang/rust/pull/118297 [5] > Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-2-08= ba9197f637@google.com/#Z31rust:kernel:lib.rs [6] > Link: https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/chec= k-cfg.html [7] > Link: https://github.com/rust-lang/rfcs/pull/3013#issuecomment-1936648479= [8] > Link: https://github.com/rust-lang/rust/issues/82450#issuecomment-1947462= 977 [9] > Signed-off-by: Miguel Ojeda Reviewed-by: Alice Ryhl