Skip to content

hashbrown fails to compile on avr architectures because target_pointer_width is 16 #352

@mutantbob

Description

@mutantbob

I am porting an embedded app to AVR, and hashbrown is giving me several compile errors:

error[E0433]: failed to resolve: use of undeclared type `GroupWord`
  --> /home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.3.1/src/raw/generic.rs:33:18
   |
33 |     let repeat = GroupWord::from(byte);
   |                  ^^^^^^^^^ use of undeclared type `GroupWord`

error[E0425]: cannot find value `K` in this scope
  --> /home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/hashbrown-0.3.1/src/fx.rs:41:69
   |
41 |         self.hash = self.hash.rotate_left(5).bitxor(i).wrapping_mul(K);
   |                                                                     ^ help: a local variable with a similar name exists: `i`

it appears hashbrown has cfg checks based on target_pointer_width, but no clause cover the 16-bit pointer case (AVR has 16-bit pointers)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions