KyleMayes / clang-sys

Rust bindings for libclang.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

clang-sys does not build on rust 1.53 Nightly

ubamrein opened this issue · comments

I was trying to build some libraries on the nightly 1.53 (rustc 1.53.0-nightly (d0695c908 2021-04-12)) rust compiler. Sadly I get a lot of those errors:

error[E0642]: patterns aren't allowed in methods without bodies
    --> /Users/test/.cargo/registry/src/github.com-1ecc6299db9ec823/clang-sys-1.2.0/src/lib.rs:1966:37
     |
1966 |     pub fn clang_findIncludesInFile(tu: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult;
     |                                     ^^
     |
help: give this argument a name or use an underscore to ignore it
     |
1966 |     pub fn clang_findIncludesInFile(_: CXTranslationUnit, file: CXFile, cursor: CXCursorAndRangeVisitor) -> CXResult;

When I switch to the stable channel it works. I don't really know what that means (and I could only find an issue from 4 years ago, related torustc-serialize) and if it is acually related to clang-sys or if it is a compiler bug.

I will link this issue on the rust-lang compiler repo as well :)

compiler regression:

Fixed by: rust-lang/rust#84162

Checked with:

rustc 1.53.0-nightly (42816d61e 2021-04-24)
binary: rustc
commit-hash: 42816d61ead7e46d462df997958ccfd514f8c21c
commit-date: 2021-04-24
host: x86_64-apple-darwin
release: 1.53.0-nightly
LLVM version: 12.0.0