rust-lang / rust-lang/rust-bindgen

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

Open
#2,712 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the report. Start by reproducing the shown bindgen::CargoCallbacks import and Builder usage, then inspect the CargoCallbacks deprecation declaration and its documentation; done means the demonstrated CargoCallbacks::new() usage produces no warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.