diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2016-02-18 05:19:19 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2016-02-24 18:40:38 -0500 |
| commit | 7c2e5e35a61adfee1fec69f811f79930bfd2c3b9 (patch) | |
| tree | 841b928d86fab527e93392f0e116b0e52d6e367c /src/libtest | |
| parent | 0ef8d426050318934d16d962325ec002eaf0c29d (diff) | |
| download | rust-7c2e5e35a61adfee1fec69f811f79930bfd2c3b9.tar.gz rust-7c2e5e35a61adfee1fec69f811f79930bfd2c3b9.zip | |
Generalize from passing around a single path to the test file to passing
around a set of paths called `TestPaths` This commit is not quite standalone; it basically contains all the borrowing plumbing bits, the interesting stuff comes in the next commit.
Diffstat (limited to 'src/libtest')
| -rw-r--r-- | src/libtest/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 5693cc10a0f..e82451937d3 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -203,7 +203,12 @@ pub struct TestDesc { pub should_panic: ShouldPanic, } -unsafe impl Send for TestDesc {} +#[derive(Clone)] +pub struct TestPaths { + pub file: PathBuf, // e.g., compile-test/foo/bar/baz.rs + pub base: PathBuf, // e.g., compile-test, auxiliary + pub relative_dir: PathBuf, // e.g., foo/bar +} #[derive(Debug)] pub struct TestDescAndFn { |
