diff --git a/src/bootstrap/src/core/build_steps/doc.rs b/src/bootstrap/src/core/build_steps/doc.rs index 99440482adc..1ef481408f9 100644 --- a/src/bootstrap/src/core/build_steps/doc.rs +++ b/src/bootstrap/src/core/build_steps/doc.rs @@ -743,7 +743,8 @@ fn run(self, builder: &Builder<'_>) { // Sanity check on linked compiler crates for krate in &*self.crates { let dir_name = krate.replace("-", "_"); - assert!(out.join(&*dir_name).exists()); + // Making sure the directory exists and is not empty. + assert!(out.join(&*dir_name).read_dir().unwrap().next().is_some()); } }