Closed
Description
Here's what happens when I run cargo report future-incompatibilities --id 1
while attempting to build my kernel which depends on bootloader-x86_64-uefi
which depends in turn on this crate:
The following warnings were discovered during the build. These warnings are an
indication that the packages contain code that will become an error in a
future release of Rust. These warnings typically cover changes to close
soundness problems, unintended or undocumented behavior, or critical problems
that cannot be fixed in a backwards-compatible fashion, and are not expected
to be in wide use.
Each warning should contain a link for more information on what the warning
means and how to resolve it.
To solve this problem, you can try the following approaches:
- Some affected dependencies have newer versions available.
You may want to consider updating them to a newer version to see if the issue has been fixed.
uefi v0.18.0 has the following newer versions available: 0.19.0, 0.19.1, 0.20.0
- If the issue is not solved by updating the dependencies, a fix has to be
implemented by those dependencies. You can help with that by notifying the
maintainers of this problem (e.g. by creating a bug report) or by proposing a
fix to the maintainers (e.g. by creating a pull request):
- [email protected]
- Repository: https://github.com/rust-osdev/uefi-rs
- Detailed warning command: `cargo report future-incompatibilities --id 1 --package [email protected]`
- If waiting for an upstream fix is not an option, you can use the `[patch]`
section in `Cargo.toml` to use your own version of the dependency. For more
information, see:
https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section
The package `uefi v0.18.0` currently triggers the following future incompatibility lints:
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:125:5
> |
> 121 | #[derive(Debug, Eq, PartialEq)]
> | ----- in this derive macro expansion
> ...
> 125 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:125:5
> |
> 121 | #[derive(Debug, Eq, PartialEq)]
> | --------- in this derive macro expansion
> ...
> 125 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:125:5
> |
> 121 | #[derive(Debug, Eq, PartialEq)]
> | --------- in this derive macro expansion
> ...
> 125 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:193:5
> |
> 191 | #[derive(Debug, Eq, PartialEq)]
> | ----- in this derive macro expansion
> 192 | pub struct DevicePathInstance {
> 193 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:193:5
> |
> 191 | #[derive(Debug, Eq, PartialEq)]
> | --------- in this derive macro expansion
> 192 | pub struct DevicePathInstance {
> 193 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:193:5
> |
> 191 | #[derive(Debug, Eq, PartialEq)]
> | --------- in this derive macro expansion
> 192 | pub struct DevicePathInstance {
> 193 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:223:5
> |
> 221 | #[derive(Debug, Eq, PartialEq, Protocol)]
> | ----- in this derive macro expansion
> 222 | pub struct DevicePath {
> 223 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:223:5
> |
> 221 | #[derive(Debug, Eq, PartialEq, Protocol)]
> | --------- in this derive macro expansion
> 222 | pub struct DevicePath {
> 223 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
> warning: byte slice in a packed struct that derives a built-in trait
> --> /opt/rust/registry/src/index.crates.io-6f17d22bba15001f/uefi-0.18.0/src/proto/device_path/mod.rs:223:5
> |
> 221 | #[derive(Debug, Eq, PartialEq, Protocol)]
> | --------- in this derive macro expansion
> 222 | pub struct DevicePath {
> 223 | data: [u8],
> | ^^^^^^^^^^
> |
> = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
> = note: for more information, see issue #107457 <https://github.com/rust-lang/rust/issues/107457>
> = help: consider implementing the trait by hand, or remove the `packed` attribute
> = note: `#[allow(byte_slice_in_packed_struct_with_derive)]` on by default
> = note: this warning originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
>
Note that all of these warnings mention rust-lang/rust#107457 which is slated to eventually outlaw the use of byte slices in packed structs that use derive macros on built-in traits. This means that, for future versions of this crate, one would need to either find a different way to store this information other than using byte slices (like using UEFI's global allocator by default to copy this data to the heap for storage as a Vec
for example) or impl
these built-in macros manually for these structs instead of deriving them.
Metadata
Metadata
Assignees
Labels
No labels