Smithay/wayland-rs

Not compiles on nightly

Ddystopia opened this issue · 1 comments

> rustc --version --verbose
rustc 1.78.0-nightly (1a648b397 2024-02-11)
binary: rustc
commit-hash: 1a648b397dedc98ada3dd3360f6d661ec2436c56
commit-date: 2024-02-11
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 17.0.6
error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1].child_interface.<enum-variant(Some)>.0.<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc2328<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

note: erroneous constant encountered
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this note originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1].child_interface.<enum-variant(Some)>.0.<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc2418<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0].child_interface.<enum-variant(Some)>.0.<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc2484<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[1].arg_interfaces.<deref>[0].<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc2719<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[5].arg_interfaces.<deref>[0].<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc2930<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0080]: it is undefined behavior to use this value
   --> /home/ddystopia/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/wayland-client-0.31.2/src/lib.rs:218:9
    |
218 |         wayland_scanner::generate_interfaces!("wayland.xml");
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[7].arg_interfaces.<deref>[0].<deref>.c_ptr.<enum-variant(Some)>.0: encountered reference to mutable memory in `const`
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 8) {
                ╾───alloc3042<imm>────╼                         │ ╾──────╼
            }
    = note: this error originates in the macro `wayland_scanner::generate_interfaces` (in Nightly builds, run with -Z macro-backtrace for more info)

commit-date: 2024-02-11

Looks like you need a newer nightly. This issue occurred with some nightly releases, but should be gone in the latest one: #698