rust-lang / packed_simd

Portable Packed SIMD Vectors for Rust standard library
https://rust-lang.github.io/packed_simd/packed_simd_2/
Apache License 2.0
589 stars 74 forks source link

Could not compile packed_simd_2 #330

Closed ritchie46 closed 3 years ago

ritchie46 commented 3 years ago

I got this log on toolchain: nightly-2021-08-30

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:20:54
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 2]>`

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:30:54
   |
30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 4]>`

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:40:54
   |
40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
   |                                ----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 8]>`

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:50:56
   |
50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 16]>`

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:60:56
   |
60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 32]>`

error: type parameters must be declared prior to const parameters
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:70:56
   |
70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
   |                                 -----------------------^--^- help: reorder the parameters: lifetimes, then types, then consts: `<T, U, const IDX: [u32; 64]>`

    Checking rand_core v0.6.3
    Checking brotli v3.3.2
error: `[u32; 2]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:20:44
   |
20 | pub unsafe fn __shuffle_vector2<const IDX: [u32; 2], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 4]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:30:44
   |
30 | pub unsafe fn __shuffle_vector4<const IDX: [u32; 4], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 8]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:40:44
   |
40 | pub unsafe fn __shuffle_vector8<const IDX: [u32; 8], T, U>(x: T, y: T) -> U
   |                                            ^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 16]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:50:45
   |
50 | pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 32]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:60:45
   |
60 | pub unsafe fn __shuffle_vector32<const IDX: [u32; 32], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: `[u32; 64]` is forbidden as the type of a const generic parameter
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/packed_simd_2-0.3.6/src/codegen/llvm.rs:70:45
   |
70 | pub unsafe fn __shuffle_vector64<const IDX: [u32; 64], T, U>(x: T, y: T) -> U
   |                                             ^^^^^^^^^
   |
   = note: the only supported types are integers, `bool` and `char`
   = help: more complex types are supported with `#![feature(const_generics)]`

error: could not compile `packed_simd_2` due to 12 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Process completed with exit code 101.
JohnTitor commented 3 years ago

The crate has been updated to be compatible with a newer nightly (#328), you should update nightly version or downgrade crate version (>=0.3.5).

ritchie46 commented 3 years ago

Ok, thanks!