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)
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.

1  2 
tests/workspaces.rs

Simple merge