Skip to content

Compilation error in the vulkano crate on nightly expected isize, found i32 #137662

Closed
@ogoffart

Description

@ogoffart

Compiling the vulkano crate fails with the latest nightly.

Error:

error[E0308]: mismatched types
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/macros.rs:658:48
    |
658 |                   $flag_name = ash::vk::$ty_ffi::$flag_name_ffi.as_raw(),
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `i32`
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/acceleration_structure.rs:315:1
    |
315 | / vulkan_enum! {
316 | |     #[non_exhaustive]
317 | |
318 | |     /// The type of an acceleration structure.
...   |
330 | |     Generic = GENERIC,
331 | | }
    | |_- in this macro invocation
    |
    = note: this error originates in the macro `vulkan_enum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/macros.rs:658:48
     |
658  |                   $flag_name = ash::vk::$ty_ffi::$flag_name_ffi.as_raw(),
     |                                                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `i32`
     |
    ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/acceleration_structure.rs:1591:1
     |
1591 | / vulkan_enum! {
1592 | |     #[non_exhaustive]
1593 | |
1594 | |     /// What mode an acceleration structure copy command should operate in.
...    |
1618 | |     Deserialize = DESERIALIZE,
1619 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `vulkan_enum` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/macros.rs:658:48
     |
658  |                   $flag_name = ash::vk::$ty_ffi::$flag_name_ffi.as_raw(),
     |                                                  ^^^^^^^^^^^^^^^^^^^^^^^ expected `isize`, found `i32`
     |
    ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/vulkano-0.34.1/src/acceleration_structure.rs:1621:1
     |
1621 | / vulkan_enum! {
1622 | |     #[non_exhaustive]
1623 | |
1624 | |     /// Where the building of an acceleration structure will take place.
...    |
1634 | |     HostOrDevice = HOST_OR_DEVICE,
1635 | | }
     | |_- in this macro invocation
     |
     = note: this error originates in the macro `vulkan_enum` (in Nightly builds, run with -Z macro-backtrace for more info)

(... skipped more of the same ...)

This is using the version 0.34.1 of vulkano but I have verified this also fails in the master branch of https://github.com/vulkano-rs/vulkano/

The error was noticed because we build with nightly on our CI, and we depends on that crate

Version it worked on

Works on nightly-2025-02-24

rustc 1.87.0-nightly (f8a913b 2025-02-23)

Version with regression

Current nightly

rustc 1.87.0-nightly (85abb27 2025-02-25)

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

Metadata

Metadata

Assignees

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)A-reprArea: the `#[repr(stuff)]` attributeC-bugCategory: This is a bug.P-criticalCritical priorityS-has-bisectionStatus: a bisection has been found for this issueS-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions