Skip to content

Building on ix86 fails #282

@Jakuje

Description

@Jakuje

Some changes to the tests fail to build on 32bit architecture now (the code released in 0.10).

To prevent this in future, we should consider adding a CI job testing on 32b architecture.

Found this only while trying to update the package in Fedora.

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
   --> tests/basic.rs:458:56
    |
458 |         Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
    |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
    |
    = help: the trait `From<u64>` is not implemented for `Ulong`
            but trait `From<u32>` is implemented for it
    = help: for that trait implementation, expected `u32`, found `u64`
    = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
   --> tests/basic.rs:569:56
    |
569 |         Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
    |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
    |
    = help: the trait `From<u64>` is not implemented for `Ulong`
            but trait `From<u32>` is implemented for it
    = help: for that trait implementation, expected `u32`, found `u64`
    = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:1681:56
     |
1681 |         Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2182:56
     |
2182 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2193:56
     |
2193 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2237:56
     |
2237 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2275:56
     |
2275 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2286:56
     |
2286 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2353:56
     |
2353 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2392:56
     |
2392 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2403:56
     |
2403 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2443:56
     |
2443 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2481:56
     |
2481 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2493:60
     |
2493 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2502:60
     |
2502 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2573:60
     |
2573 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2583:60
     |
2583 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2637:56
     |
2637 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2649:60
     |
2649 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2658:60
     |
2658 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2762:60
     |
2762 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2772:60
     |
2772 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2822:56
     |
2822 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2834:60
     |
2834 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2843:60
     |
2843 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2910:60
     |
2910 |             Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2920:60
     |
2920 |             Attribute::ValueLen((AES128_BLOCK_SIZE as u64).into()),
     |                                                            ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2974:56
     |
2974 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:2985:56
     |
2985 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:3123:56
     |
3123 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:3134:56
     |
3134 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:3246:56
     |
3246 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

error[E0277]: the trait bound `Ulong: From<u64>` is not satisfied
    --> tests/basic.rs:3257:56
     |
3257 |         Attribute::ValueLen((AES256_BLOCK_SIZE as u64).into()),
     |                                                        ^^^^ the trait `From<u64>` is not implemented for `Ulong`
     |
     = help: the trait `From<u64>` is not implemented for `Ulong`
             but trait `From<u32>` is implemented for it
     = help: for that trait implementation, expected `u32`, found `u64`
     = note: required for `u64` to implement `Into<Ulong>`

warning: variable does not need to be mutable
    --> tests/basic.rs:1200:9
     |
1200 |     let mut priv_attribs = [
     |         ----^^^^^^^^^^^^
     |         |
     |         help: remove this `mut`
     |
     = note: `#[warn(unused_mut)]` on by default

For more information about this error, try `rustc --explain E0277`.
warning: `cryptoki` (test "basic") generated 1 warning
error: could not compile `cryptoki` (test "basic") due to 33 previous errors; 1 warning emitted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions