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(
1239
1239
/// use bindgen::builder;
1240
1240
/// let bindings = builder()
1241
1241
/// .header("path/to/input/header")
1242
- /// .parse_callbacks(Box::new(bindgen::CargoCallbacks))
1242
+ /// .parse_callbacks(Box::new(bindgen::CargoCallbacks::new() ))
1243
1243
/// .generate();
1244
1244
/// ```
1245
1245
#[ derive( Debug ) ]
Original file line number Diff line number Diff line change @@ -48,9 +48,6 @@ fn main() {
48
48
// automatically know it must look for a `libhello.a` file.
49
49
println!("cargo:rustc-link-lib=hello");
50
50
51
- // Tell cargo to invalidate the built crate whenever the header changes.
52
- println!("cargo:rerun-if-changed={}", headers_path_str);
53
-
54
51
// Run `clang` to compile the `hello.c` file into a `hello.o` object file.
55
52
// Unwrap if it is not possible to spawn the process.
56
53
if !std::process::Command::new("clang")
@@ -91,7 +88,7 @@ fn main() {
91
88
.header(headers_path_str)
92
89
// Tell cargo to invalidate the built crate whenever any of the
93
90
// included header files changed.
94
- .parse_callbacks(Box::new(CargoCallbacks))
91
+ .parse_callbacks(Box::new(CargoCallbacks::new() ))
95
92
// Finish the builder and generate the bindings.
96
93
.generate()
97
94
// Unwrap the Result and panic on failure.
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ fn main() {
21
21
// shared library.
22
22
println!("cargo:rustc-link-lib=bz2");
23
23
24
- // Tell cargo to invalidate the built crate whenever the wrapper changes
25
- println!("cargo:rerun-if-changed=wrapper.h");
26
-
27
24
// The bindgen::Builder is the main entry point
28
25
// to bindgen, and lets you build up options for
29
26
// the resulting bindings.
You can’t perform that action at this time.
0 commit comments