Skip to content

Commit 670ec6e

Browse files
committed
Add some coments explaning the WhichTempDir type.
(That type maybe should just be an enum rather than a trait you implement... not sure why I made it so general...)
1 parent 76729f1 commit 670ec6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/common/which_temp.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ pub trait WhichTempDirectory {
1616
// Doing so has two drawbacks: 1. You need to clean-up the
1717
// generated directory yourself, and 2. You risk race conditions with
1818
// concurrent test runs.
19+
//
20+
// If you cange this to `GenerateIntoFreshTemp`, you get a fresh directory
21+
// (rooted at whatever is returned from `tempfile::tempdir()`). This reduces
22+
// race conditions (note that `cargo-bisect-rustc` still stores data in shared
23+
// locations like `~/.rustup`, so races can still arise) and allows the test
24+
// suite to clean up the directory itself.
1925
pub(crate) type WhichTempDir /*: WhichTempDirectory*/ = GenerateIntoFreshTemp;
2026

2127
/// Using `GenerateIntoFreshTemp` yields a fresh directory in some

0 commit comments

Comments
 (0)