Auto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad
authorbors <bors@rust-lang.org>
Thu, 12 Oct 2017 08:52:44 +0000 (08:52 +0000)
committerbors <bors@rust-lang.org>
Thu, 12 Oct 2017 08:52:44 +0000 (08:52 +0000)
commit5763451096449580e18eadcc9f62278b665f4276
tree27cd503e429a9066d6cefc849582b101fc18567c
parenta7d3927954c6e82086e1162d7123572eae30b1a9
parentd43ee1dd22eb37c2515a8309331e4600ea6ecdb3
Auto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad

cargotest/support: remove internal mutability in favor of switching types

`Cell<bool>` was removed from `ProjectBuilder`. Instead `PhantomData<T>` was added to it (and `RepoBuilder`) to manage state transition in the type level (`T` is either `Configuring` or `Done`.)
`ProjectBuilder::cargo_process()` was removed as its design heavily depended on the internal mutability.

Also added `#[must_use]` to `ProjectBuilder` and `RepoBuilder` to check for call sites of their `build()` method.
tests/workspaces.rs