@@ -115,47 +115,6 @@ pub struct Layout {
115115 build_dir : BuildDirLayout ,
116116}
117117
118- pub struct ArtifactDirLayout {
119- /// The final artifact destination: `<artifact-dir>/debug` (or `release`).
120- dest : PathBuf ,
121- /// The directory for examples
122- examples : PathBuf ,
123- /// The directory for rustdoc output
124- doc : PathBuf ,
125- /// The directory for --timings output
126- timings : PathBuf ,
127- /// The lockfile for a build (`.cargo-lock`). Will be unlocked when this
128- /// struct is `drop`ped.
129- _lock : FileLock ,
130- }
131-
132- pub struct BuildDirLayout {
133- /// The root directory: `/path/to/build-dir`.
134- /// If cross compiling: `/path/to/build-dir/$TRIPLE`.
135- root : PathBuf ,
136- /// The directory with rustc artifacts
137- deps : PathBuf ,
138- /// The primary directory for build files
139- build : PathBuf ,
140- /// The directory for artifacts, i.e. binaries, cdylibs, staticlibs
141- artifact : PathBuf ,
142- /// The directory for incremental files
143- incremental : PathBuf ,
144- /// The directory for fingerprints
145- fingerprint : PathBuf ,
146- /// The directory for pre-uplifted examples: `build-dir/debug/examples`
147- examples : PathBuf ,
148- /// The directory for temporary data of integration tests and benches
149- tmp : PathBuf ,
150- /// The lockfile for a build (`.cargo-lock`). Will be unlocked when this
151- /// struct is `drop`ped.
152- ///
153- /// Will be `None` when the build-dir and target-dir are the same path as we cannot
154- /// lock the same path twice.
155- _lock : Option < FileLock > ,
156- is_new_layout : bool ,
157- }
158-
159118impl Layout {
160119 /// Calculate the paths for build output, lock the build directory, and return as a Layout.
161120 ///
@@ -252,6 +211,20 @@ impl Layout {
252211 }
253212}
254213
214+ pub struct ArtifactDirLayout {
215+ /// The final artifact destination: `<artifact-dir>/debug` (or `release`).
216+ dest : PathBuf ,
217+ /// The directory for examples
218+ examples : PathBuf ,
219+ /// The directory for rustdoc output
220+ doc : PathBuf ,
221+ /// The directory for --timings output
222+ timings : PathBuf ,
223+ /// The lockfile for a build (`.cargo-lock`). Will be unlocked when this
224+ /// struct is `drop`ped.
225+ _lock : FileLock ,
226+ }
227+
255228impl ArtifactDirLayout {
256229 /// Makes sure all directories stored in the Layout exist on the filesystem.
257230 pub fn prepare ( & mut self ) -> CargoResult < ( ) > {
@@ -277,6 +250,33 @@ impl ArtifactDirLayout {
277250 }
278251}
279252
253+ pub struct BuildDirLayout {
254+ /// The root directory: `/path/to/build-dir`.
255+ /// If cross compiling: `/path/to/build-dir/$TRIPLE`.
256+ root : PathBuf ,
257+ /// The directory with rustc artifacts
258+ deps : PathBuf ,
259+ /// The primary directory for build files
260+ build : PathBuf ,
261+ /// The directory for artifacts, i.e. binaries, cdylibs, staticlibs
262+ artifact : PathBuf ,
263+ /// The directory for incremental files
264+ incremental : PathBuf ,
265+ /// The directory for fingerprints
266+ fingerprint : PathBuf ,
267+ /// The directory for pre-uplifted examples: `build-dir/debug/examples`
268+ examples : PathBuf ,
269+ /// The directory for temporary data of integration tests and benches
270+ tmp : PathBuf ,
271+ /// The lockfile for a build (`.cargo-lock`). Will be unlocked when this
272+ /// struct is `drop`ped.
273+ ///
274+ /// Will be `None` when the build-dir and target-dir are the same path as we cannot
275+ /// lock the same path twice.
276+ _lock : Option < FileLock > ,
277+ is_new_layout : bool ,
278+ }
279+
280280impl BuildDirLayout {
281281 /// Makes sure all directories stored in the Layout exist on the filesystem.
282282 pub fn prepare ( & mut self ) -> CargoResult < ( ) > {
0 commit comments