rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Clippy will warn on `use bindgen::CargoCallbacks;` regardless of the usage

Open latin-1 opened this issue 1 year ago • 1 comments

I'm not sure if it should be reported here though.

Input C/C++ Header

Bindgen Invocation

use bindgen::CargoCallbacks;
//           ^^^^^^^^^^^^^^

bindgen::Builder::default()
    .header("input.h")
    .parse_callbacks(Box::new(CargoCallbacks::new()))
    .generate()
    .unwrap()

Actual Results

error: use of deprecated constant `bindgen::CargoCallbacks`: Use `CargoCallbacks::new()` instead. Please, check the documentation for further information.

Expected Results

No warnings.

latin-1 avatar Jan 08 '24 11:01 latin-1

Hmm yeah, that's rather unfortunate. Regression from #2653 I guess. I guess we could just do a breaking bump and remove the deprecated item. @pvdrz thoughts?

emilio avatar Jan 12 '24 22:01 emilio