Skip to content

kyber1024: ref polyvec.rs mismatched types #3

@pinkforest

Description

@pinkforest

Got this in CI when doing feature testing

$ cargo build --release --target thumbv7em-none-eabi --no-default-features --features kyber1024

   Compiling safe_pqc_kyber v0.6.2 (/home/foobar/code/safe-kyber)
warning: dropping unsupported crate type `cdylib` for target `thumbv7em-none-eabi`

error[E0308]: mismatched types
  --> src/reference/polyvec.rs:39:31
   |
39 |           let mut tmp : u64 = ((t[k] as u32) << 11) + KYBER_Q as u32/2;
   |                         ---   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
   |                         |
   |                         expected due to this
   |
help: you can convert a `u32` to a `u64`
   |
39 |           let mut tmp : u64 = (((t[k] as u32) << 11) + KYBER_Q as u32/2).into();
   |                               +                                        ++++++++

For more information about this error, try `rustc --explain E0308`.
warning: `safe_pqc_kyber` (lib) generated 1 warning
error: could not compile `safe_pqc_kyber` (lib) due to 1 previous error; 1 warning emitted
[foobar@localhost safe-kyber]$ 

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