We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc3ed2 commit 14e9100Copy full SHA for 14e9100
tests/compile-test.rs
@@ -181,8 +181,15 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
181
}
182
183
let src_path = case.path().join("src");
184
- env::set_current_dir(&src_path)?;
185
+ // When switching between branches, if the previous branch had a test
186
+ // that the current branch does not have, the directory is not removed
187
+ // because an ignored Cargo.lock file exists.
188
+ if !src_path.exists() {
189
+ continue;
190
+ }
191
+
192
+ env::set_current_dir(&src_path)?;
193
for file in fs::read_dir(&src_path)? {
194
let file = file?;
195
if file.file_type()?.is_dir() {
0 commit comments