Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust: upgrade to Rust 1.66.0 #947

Closed
wants to merge 3 commits into from
Closed

Conversation

ojeda
Copy link
Member

@ojeda ojeda commented Dec 25, 2022

Required changes:

I will have to reword the first commit for upstreaming and possibly split it somehow to make it easier to read. For the moment, this should unblock those waiting for 1.66.0 and start testing it on our side.

As a triple-check, I redid the functions by hand and spotted a doc sentence missed from an old upgrade. Nothing important, but I included it here as the third commit too.

Signed-off-by: Miguel Ojeda ojeda@kernel.org

@Conan-Kudo
Copy link

cc: @marcan @davide125

@aliceinwire
Copy link

Few of this problem are referenced in the following PR:

@@ -143,6 +143,7 @@ fn param_ops_path(param_type: &str) -> &'static str {
}
}

#[allow(clippy::type_complexity)]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referenced in PR #898

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alice!

@@ -119,6 +119,7 @@ impl<T: DriverOps> Drop for Registration<T> {
/// - [`RawDeviceId::ZERO`] is actually a zeroed-out version of the raw device id.
/// - [`RawDeviceId::to_rawid`] stores `offset` in the context/data field of the raw device id so
/// that buses can recover the pointer to the data.
#[const_trait]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did something break without this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was due to (added it to OP):

error: ~const can only be applied to `#[const_trait]` traits
   --> rust/kernel/driver.rs:156:19
    |
156 |         T: ~const RawDeviceId + Copy,
    |                   ^^^^^^^^^^^

error: const `impl` for trait `RawDeviceId` which is not marked with `#[const_trait]`
   --> rust/kernel/of.rs:40:19
    |
40  | unsafe impl const driver::RawDeviceId for DeviceId {
    |                   ^^^^^^^^^^^^^^^^^^^
    |
   ::: rust/kernel/driver.rs:122:1
    |
122 | pub unsafe trait RawDeviceId {
    | - help: mark `RawDeviceId` as const: `#[const_trait]`
    |
    = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change

error: aborting due to 2 previous errors

@alex
Copy link
Member

alex commented Dec 26, 2022

Only did a limited review, but LGTM.

@YakoYakoYokuYoku
Copy link

Builds without warnings, LGTM

Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>

@Conan-Kudo
Copy link

cc: @asahilina

@ojeda
Copy link
Member Author

ojeda commented Dec 26, 2022

Thanks everyone! That was awesome.

@nbdd0121 @vincenzopalazzo @bjorn3 I am transforming your GH approvals into Reviewed-bys -- let me know if you didn't intend that (in which case I will remove it when I submit it for upstream).

@ojeda
Copy link
Member Author

ojeda commented Dec 26, 2022

v2: no changes, just collected the tags.

@aliceinwire
Copy link

Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>

@Conan-Kudo
Copy link

Copy link

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my build is fixed, but the result seems to cause Xorg to crash. This probably means that @asahilina needs to adapt her code to Rust 1.66.

Otherwise, this looks reasonable.

Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>

@Conan-Kudo
Copy link

Also, it probably makes sense to add Reported-by: Neal Gompa <neal@gompa.dev> here, since this was triggered by my post in the Zulip.

staging-kernelci-org pushed a commit to kernelci/kernelci-core that referenced this pull request Dec 27, 2022
Rust 1.66.0 will be the next version supported by the kernel [1].

Therefore, add `rustc-1.66` as a new build environment alongside
`rustc-1.62` (which can be removed later on when the new version
hits mainline).

Link: Rust-for-Linux/linux#947 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
staging-kernelci-org pushed a commit to kernelci/kernelci-core that referenced this pull request Dec 27, 2022
The `rust` branch of `rust-for-linux` is moving to Rust 1.66.0 [1],
therefore, use the new build environment for it.

Link: Rust-for-Linux/linux#947 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Copy link

@Conan-Kudo Conan-Kudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, we apparently tested the wrong kernel build. The correct kernel build works, so I give this a total 👍🏾

Reported-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>

@Conan-Kudo
Copy link

I also needed a minor tweak from @ericcurtin to get bindgen working too: https://gitlab.com/fedora-asahi/kernel-asahi/-/commit/7407fdf7716f3233da56a5fb4e2e28fffb775fa5

Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
…nings

Since Rust 1.63.0, `rustdoc` complains with `broken_intra_doc_links`
about intra-doc links pointing to exported `macro_rules`, e.g.:

    error: unresolved link to `dev_info`
       --> rust/kernel/device.rs:135:43
        |
    135 |     /// More details are available from [`dev_info`].
        |                                           ^^^^^^^^ no item named `dev_info` in scope
        |
        = note: `macro_rules` named `dev_info` exists in this crate, but it is not in scope at this link's location
        = note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`

    error: aborting due to previous error

The text is confusing, because the link still gets generated, and previous versions
(<= 1.62) did not warn and also generated the link. This was reported
upstream at [1], and it turns out that the link still being generated was
a compatibility measure for docs.rs, which may get removed soon. Thus
the intended behavior is that the user specifies the proper path.

Therefore, clean up the `allow()`s introduced earlier to satisfy `rustdoc`
and the new behavior.

Link: rust-lang/rust#106142 [1]
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
An update missing from Rust 1.57.0. The comment was added in upstream
commit e8e7f6e05cf6 ("Add truncate note to Vec::resize") to `resize`,
but not to our fallible version `try_resize`.

Fixes: 7aaec26 ("rust: alloc: upgrade to 1.57.0")
Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
aliceinwire pushed a commit to kernelci/kernelci-core that referenced this pull request Jan 11, 2023
Rust 1.66.0 will be the next version supported by the kernel [1].

Therefore, add `rustc-1.66` as a new build environment alongside
`rustc-1.62` (which can be removed later on when the new version
hits mainline).

Link: Rust-for-Linux/linux#947 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
aliceinwire pushed a commit to kernelci/kernelci-core that referenced this pull request Jan 11, 2023
The `rust` branch of `rust-for-linux` is moving to Rust 1.66.0 [1],
therefore, use the new build environment for it.

Link: Rust-for-Linux/linux#947 [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
@ojeda
Copy link
Member Author

ojeda commented Jan 11, 2023

Thanks a lot for the extra reviews & tests, @aliceinwire and @Conan-Kudo, very much appreciated.

v3: tags collected for the forthcoming merge and added a proper commit message for the first patch.

Also, it probably makes sense to add Reported-by: Neal Gompa neal@gompa.dev here, since this was triggered by my post in the Zulip.

Reported-by is meant for bugs only according to the docs. In any case, version upgrades will keep happening until we reach a stable release, and others (e.g. @bjorn3 if I recall correctly) suggested/discussed the 1.66 upgrade in the past. For non-routine version upgrades, we could perhaps do Suggested-bys, but really they make sense only after we are in a stable situation.

@ojeda
Copy link
Member Author

ojeda commented Jan 11, 2023

Via the button (we don't push on this branch). I have been experiencing GitHub timeouts very often in the last few days, too (e.g. some minutes ago when clicking the "Compare" button above for v2..v3).

@ojeda ojeda closed this Jan 11, 2023
@ojeda ojeda deleted the 1.66.0 branch January 11, 2023 15:33
y86-dev pushed a commit to y86-dev/linux that referenced this pull request Jan 11, 2023
vvarma pushed a commit to vvarma/rusty-linux that referenced this pull request Jan 24, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
asahilina pushed a commit to AsahiLinux/linux that referenced this pull request Feb 16, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
asahilina pushed a commit to AsahiLinux/linux that referenced this pull request Feb 16, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
mairacanal pushed a commit to mairacanal/linux that referenced this pull request Mar 2, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 9, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
jannau pushed a commit to jannau/linux that referenced this pull request Mar 28, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
eaxeax pushed a commit to eaxeax/asahi-linux-pf that referenced this pull request Apr 10, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
WhatAmISupposedToPutHere pushed a commit to WhatAmISupposedToPutHere/linux that referenced this pull request Apr 24, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
asahilina pushed a commit to AsahiLinux/linux that referenced this pull request Apr 28, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
asahilina pushed a commit to AsahiLinux/linux that referenced this pull request May 19, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Kaz205 pushed a commit to Kaz205/linux that referenced this pull request May 30, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 9, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 16, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 21, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 26, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 26, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jun 29, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 2, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 2, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 3, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 5, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 5, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 11, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
herrnst pushed a commit to herrnst/linux-asahi that referenced this pull request Jul 12, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Kaz205 pushed a commit to Kaz205/linux that referenced this pull request Jul 14, 2023
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
kkpan11 pushed a commit to kkpan11/AsahiLinux-linux that referenced this pull request Feb 3, 2024
Upgrade the Rust version from 1.62.0 to 1.66.0.

The overwhelming majority of the commit is about upgrading our `alloc`
fork to the new version from upstream [1]. License has not changed [2][3]
(there were changes in the `COPYRIGHT` file, but unrelated to `alloc`).

As in the previous version upgrades (done out of tree so far), upgrading
`alloc` requires checking that our small additions (`try_*`) still match
their original (non`-try_*`) versions.

With this version upgrade, the following unstable Rust features were
stabilized: `bench_black_box` (1.66.0), `const_ptr_offset_from` (1.65.0),
`core_ffi_c` (1.64.0) and `generic_associated_types` (1.65.0). Thus
remove them.

This also implies that only two unstable features remain allowed for
non-`rust/` code: `allocator_api` and `const_refs_to_cell`.

There are some new Clippy warnings that we are triggering (i.e.
introduced since 1.62.0), as well as a few others that were not
triggered before, thus allow them in this commit and clean up or
remove them as needed later on:

  - `borrow_deref_ref` (new in 1.63.0).
  - `explicit_auto_deref` (new in 1.64.0).
  - `bool_to_int_with_if` (new in 1.65.0).
  - `needless_borrow`.
  - `type_complexity`.
  - `unnecessary_cast` (allowed only on `CONFIG_ARM`).

Furthermore, `rustdoc` lint `broken_intra_doc_links` is triggering on
links pointing to `macro_export` `macro_rules` defined in the same
module (i.e. appearing in the crate root).

However, even if the warning appears, the link still gets generated
like in previous versions, thus it is a bit confusing. An issue has
been opened upstream [4], and it appears that the link still being
generated was a compatibility measure, thus we will need to adapt
to the new behavior (done in the next patch).

In addition, there is an added `#[const_trait]` attribute in
`RawDeviceId`, due to 1.66.0's PR "Require `#[const_trait]` on `Trait`
for `impl const Trait`") [5].

Finally, the `-Aunused-imports` was added for compiling `core`. This was
fixed upstream for 1.67.0 in PR "Fix warning when libcore is compiled
with no_fp_fmt_parse" [6], and prevented for the future for that `cfg`
in PR "core: ensure `no_fp_fmt_parse builds` are warning-free" [7].

Reviewed-by: Björn Roy Baron <bjorn3_gh@protonmail.com>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Tested-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Tested-by: Alice Ferrazzi <alice.ferrazzi@miraclelinux.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Tested-by: Neal Gompa <neal@gompa.dev>
Link: Rust-for-Linux/linux#947
Link: https://github.com/rust-lang/rust/tree/1.66.0/library/alloc/src [1]
Link: https://github.com/rust-lang/rust/blob/1.66.0/library/alloc/Cargo.toml#L4 [2]
Link: https://github.com/rust-lang/rust/blob/1.66.0/COPYRIGHT [3]
Link: rust-lang/rust#106142 [4]
Link: rust-lang/rust#100982 [5]
Link: rust-lang/rust#105434 [6]
Link: rust-lang/rust#105811 [7]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants