contain-rs / bit-set

A Set of Bits
Apache License 2.0
63 stars 25 forks source link

Broken compilation as a dependency #21

Open almindor opened 4 years ago

almindor commented 4 years ago

For some reason I get this error with latest stable rust@v1.44.0

Running `rustc --crate-name big_enum_set_derive --edition=2018 /github.com-1ecc6299db9ec823/big_enum_set_derive-0.1.6/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C debuginfo=2 --cfg 'feature="serde"' -C metadata=82cd449cce14ad1b -C extra-filename=-82cd449cce14ad1b --out-dir /target/debug/deps -L dependency=/target/debug/deps --extern bit_set=/target/debug/deps/libbit_set-4520cb6de2dc6fe1.rlib --extern bit_vec=/target/debug/deps/libbit_vec-f0539eb5babad206.rlib --extern darling=/target/debug/deps/libdarling-928fe7e4429f8545.rlib --extern proc_macro2=/target/debug/deps/libproc_macro2-c2ad304f8ec9961e.rlib --extern quote=/target/debug/deps/libquote-eb0e517bdf4c6699.rlib --extern syn=/target/debug/deps/libsyn-4bd95eee795b32bf.rlib --extern proc_macro --cap-lints allow -C link-arg=-fuse-ld=lld -C link-arg=-fuse-ld=lld`
       Fresh specs v0.15.1
error[E0599]: no function or associated item named `from_iter` found for struct `bit_set::BitSet<B>` in the current scope
   --> /github.com-1ecc6299db9ec823/big_enum_set_derive-0.1.6/src/lib.rs:203:22
    |
203 |         BitSet::<B>::from_iter(all_variants)
    |                      ^^^^^^^^^ function or associated item not found in `bit_set::BitSet<B>`
    | 
   ::: /github.com-1ecc6299db9ec823/bit-set-0.5.2/src/lib.rs:105:1
    |
105 | pub struct BitSet<B = u32> {
    | -------------------------- doesn't satisfy `bit_set::BitSet<B>: std::iter::FromIterator<usize>`
    |
    = note: the method `from_iter` exists but the following trait bounds were not satisfied:
            `B: bit_vec::BitBlock`
            which is required by `bit_set::BitSet<B>: std::iter::FromIterator<usize>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0599`.
error: could not compile `big_enum_set_derive`.

This happens while compiling big_enum_set_derive as a dependency, doesn't seem to have anything to do with the project using it.

pczarn commented 2 months ago

You are probably giving it a B that is not guaranteed to be a BitBlock. That's what the error message says.