KyleMayes / clang-sys

Rust bindings for libclang.
Apache License 2.0
128 stars 65 forks source link

Error message improvements #159

Closed KyleMayes closed 1 year ago

KyleMayes commented 1 year ago

https://github.com/rust-lang/rust-bindgen/issues/2446

The error message from the initial post in that issue would look like this after these changes:

A `libclang` function was called that is not supported by the loaded `libclang` instance.

    called function = `clang_getTranslationUnitTargetInfo`
    loaded `libclang` instance = 3.9.x

This crate only supports `libclang` 3.5 and later.
The minimum `libclang` requirement for this particular function can be found here:
https://docs.rs/clang-sys/latest/clang_sys/clang_getTranslationUnitTargetInfo/index.html

Instructions for installing `libclang` can be found here:
https://rust-lang.github.io/rust-bindgen/requirements.html