Skip to content

error: array lengths can't depend on generic parameters #50

Closed
@jonathanstrong

Description

@jonathanstrong

ran into this error with nightly (via $ cargo check on master at 4ac62c2):

error: array lengths can't depend on generic parameters
   --> src/sgemm_kernel.rs:223:40
    |
223 |     let mut ab = [_mm256_setzero_ps(); MR];
    |                                        ^^
$ rustc --version
rustc 1.42.0-nightly (a9dd56ff9 2019-12-30)

haven't been able to make much headway in understanding what changed in rustc, but it seems likely this is a compiler bug.

It looks like substituting a const fn implemented on the struct does work (current implementation seems to rely on trait associated constants).

update: for a quick workaround, roll-back to nightly-2019-12-25 (ho ho ho!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions