cbindgen icon indicating copy to clipboard operation
cbindgen copied to clipboard

0.14.2 fails to build on Rust 1.34.0

Open jasonish opened this issue 5 years ago • 4 comments

Just wanted to drop a note that while 0.14.1 builds find on Rust 1.34.0 (actually 1.32 and newer), 0.14.2 requires Rust 1.37.0 due to:

error: enum variants on type aliases are experimental
  --> /home/jason/.cargo/registry/src/github.com-1ecc6299db9ec823/cbindgen-0.14.2/src/bindgen/ir/enumeration.rs:37:9
   |
37 |         Self::Empty(AnnotationSet::new())
   |         ^^^^^^^^^^^

jasonish avatar May 01 '20 05:05 jasonish

hmm, we should definitely document and test our MSRV.

If you send a PR to fix that I'd be happy to merge it and release it as 0.14.3 if you want.

emilio avatar May 01 '20 10:05 emilio

Can you reproduce with the 0.14.6 version?

Hywan avatar Sep 24 '20 11:09 Hywan

I don't get the same error. But I get this error on versions of rustc < 1.41.0.

error[E0599]: no method named `as_deref` found for type `std::option::Option<std::path::PathBuf>` in the current scope
   --> /home/jason/.cargo/registry/src/github.com-1ecc6299db9ec823/cbindgen-0.14.6/src/bindgen/parser.rs:285:52
    |
285 |                 self.process_mod(pkg, next_mod_dir.as_deref(), inline_items, depth)?;
    |                                                    ^^^^^^^^ help: there is a method with a similar name: `as_ref`

and a bunch of others with respect to as_deref.

Command to reproduce:

cargo +1.34.2 install --force cbindgen --version 0.14.6

jasonish avatar Sep 30 '20 19:09 jasonish

This issue can be closed, 0.14 is long unsupported now.

linkmauve avatar Sep 01 '23 10:09 linkmauve