rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alice Ryhl <aliceryhl@google.com>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Wedson Almeida Filho" <wedsonaf@gmail.com>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@samsung.com>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@lists.linux.dev
Subject: Re: [PATCH] rust: upgrade to Rust 1.77.0
Date: Mon, 19 Feb 2024 10:05:50 +0100	[thread overview]
Message-ID: <CAH5fLgirUqw2hkEgFKOV4a2N2sW-GAGVY=KkkyzptMN+H2txfQ@mail.gmail.com> (raw)
In-Reply-To: <20240217002717.57507-1-ojeda@kernel.org>

On Sat, Feb 17, 2024 at 1:27 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> 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-1770-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-08ba9197f637@google.com/#Z31rust:kernel:lib.rs [6]
> Link: https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/check-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-1947462977 [9]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

  parent reply	other threads:[~2024-02-19  9:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17  0:27 [PATCH] rust: upgrade to Rust 1.77.0 Miguel Ojeda
2024-02-17  6:17 ` Boqun Feng
2024-02-19  9:05 ` Alice Ryhl [this message]
2024-02-19 16:00   ` Miguel Ojeda
2024-02-19 10:02 ` Andreas Hindborg (Samsung)
2024-02-19 16:03   ` Miguel Ojeda
2024-03-29 19:48 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH5fLgirUqw2hkEgFKOV4a2N2sW-GAGVY=KkkyzptMN+H2txfQ@mail.gmail.com' \
    --to=aliceryhl@google.com \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).