Don't skip nonexistent source files · patricklam/verify-rust-std@264fa88 (original) (raw)

Original file line number Diff line number Diff line change
@@ -85,15 +85,9 @@ fn main() {
85 85 let src_root = root.join("lib").join("profile");
86 86 assert!(src_root.exists(), "profiler runtime source directory not found: {src_root:?}");
87 87 println!("cargo::rerun-if-changed={}", src_root.display());
88 -let mut n_sources_found = 0u32;
89 -for src in profile_sources {
90 -let path = src_root.join(src);
91 -if path.exists() {
92 - cfg.file(path);
93 - n_sources_found += 1;
94 -}
88 +for file in profile_sources {
89 + cfg.file(src_root.join(file));
95 90 }
96 -assert!(n_sources_found > 0, "couldn't find any profiler runtime source files in {src_root:?}");
97 91
98 92 let include = root.join("include");
99 93 println!("cargo::rerun-if-changed={}", include.display());