Skip to content

Commit 36eb13c

Browse files
daricheyfacebook-github-bot
authored andcommitted
Back out "rust-project: handle empty srcs correctly"
Summary: Original commit changeset: f5543251a432 Original Phabricator Diff: D58603700 Reviewed By: davidbarsky, dtolnay Differential Revision: D58875910 fbshipit-source-id: da32dd78b73981686fb58366629c92e9f4755335
1 parent 7994aca commit 36eb13c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

integrations/rust-project/src/target.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,6 @@ impl TargetInfo {
251251
}
252252

253253
pub(crate) fn src_dirs(&self) -> Vec<PathBuf> {
254-
// generated thrift sources might return an empty `srcs`.
255-
// if it's empty, use the parent of the root module.
256-
if self.srcs.is_empty() {
257-
if let Some(parent) = self.root_module().parent() {
258-
return vec![parent.to_owned()];
259-
}
260-
}
261-
262254
let mut all_src_dirs: Vec<&Path> = self.srcs.iter().filter_map(|p| p.parent()).collect();
263255
all_src_dirs.sort();
264256

0 commit comments

Comments
 (0)