File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1239,7 +1239,7 @@ fn get_target_dependent_env_var(
12391239/// use bindgen::builder;
12401240/// let bindings = builder()
12411241/// .header("path/to/input/header")
1242- /// .parse_callbacks(Box::new(bindgen::CargoCallbacks))
1242+ /// .parse_callbacks(Box::new(bindgen::CargoCallbacks::new() ))
12431243/// .generate();
12441244/// ```
12451245#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -48,9 +48,6 @@ fn main() {
4848 // automatically know it must look for a `libhello.a` file.
4949 println!("cargo:rustc-link-lib=hello");
5050
51- // Tell cargo to invalidate the built crate whenever the header changes.
52- println!("cargo:rerun-if-changed={}", headers_path_str);
53-
5451 // Run `clang` to compile the `hello.c` file into a `hello.o` object file.
5552 // Unwrap if it is not possible to spawn the process.
5653 if !std::process::Command::new("clang")
@@ -91,7 +88,7 @@ fn main() {
9188 .header(headers_path_str)
9289 // Tell cargo to invalidate the built crate whenever any of the
9390 // included header files changed.
94- .parse_callbacks(Box::new(CargoCallbacks))
91+ .parse_callbacks(Box::new(CargoCallbacks::new() ))
9592 // Finish the builder and generate the bindings.
9693 .generate()
9794 // Unwrap the Result and panic on failure.
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ fn main() {
2121 // shared library.
2222 println!("cargo:rustc-link-lib=bz2");
2323
24- // Tell cargo to invalidate the built crate whenever the wrapper changes
25- println!("cargo:rerun-if-changed=wrapper.h");
26-
2724 // The bindgen::Builder is the main entry point
2825 // to bindgen, and lets you build up options for
2926 // the resulting bindings.
You can’t perform that action at this time.
0 commit comments