@@ -6,7 +6,6 @@ use rustc_serialize::{Encoder, Encodable};
6
6
7
7
use core:: { Dependency , PackageId , Summary , SourceId , PackageIdSpec } ;
8
8
use core:: WorkspaceConfig ;
9
- use core:: package_id:: Metadata ;
10
9
11
10
pub enum EitherManifest {
12
11
Real ( Manifest ) ,
@@ -159,7 +158,6 @@ pub struct Target {
159
158
kind : TargetKind ,
160
159
name : String ,
161
160
src_path : PathBuf ,
162
- metadata : Option < Metadata > ,
163
161
tested : bool ,
164
162
benched : bool ,
165
163
doc : bool ,
@@ -279,7 +277,6 @@ impl Target {
279
277
kind : TargetKind :: Bin ,
280
278
name : String :: new ( ) ,
281
279
src_path : PathBuf :: new ( ) ,
282
- metadata : None ,
283
280
doc : false ,
284
281
doctest : false ,
285
282
harness : true ,
@@ -289,40 +286,35 @@ impl Target {
289
286
}
290
287
}
291
288
292
- pub fn lib_target ( name : & str , crate_targets : Vec < LibKind > ,
293
- src_path : & Path ,
294
- metadata : Metadata ) -> Target {
289
+ pub fn lib_target ( name : & str ,
290
+ crate_targets : Vec < LibKind > ,
291
+ src_path : & Path ) -> Target {
295
292
Target {
296
293
kind : TargetKind :: Lib ( crate_targets) ,
297
294
name : name. to_string ( ) ,
298
295
src_path : src_path. to_path_buf ( ) ,
299
- metadata : Some ( metadata) ,
300
296
doctest : true ,
301
297
doc : true ,
302
298
..Target :: blank ( )
303
299
}
304
300
}
305
301
306
- pub fn bin_target ( name : & str , src_path : & Path ,
307
- metadata : Option < Metadata > ) -> Target {
302
+ pub fn bin_target ( name : & str , src_path : & Path ) -> Target {
308
303
Target {
309
304
kind : TargetKind :: Bin ,
310
305
name : name. to_string ( ) ,
311
306
src_path : src_path. to_path_buf ( ) ,
312
- metadata : metadata,
313
307
doc : true ,
314
308
..Target :: blank ( )
315
309
}
316
310
}
317
311
318
312
/// Builds a `Target` corresponding to the `build = "build.rs"` entry.
319
- pub fn custom_build_target ( name : & str , src_path : & Path ,
320
- metadata : Option < Metadata > ) -> Target {
313
+ pub fn custom_build_target ( name : & str , src_path : & Path ) -> Target {
321
314
Target {
322
315
kind : TargetKind :: CustomBuild ,
323
316
name : name. to_string ( ) ,
324
317
src_path : src_path. to_path_buf ( ) ,
325
- metadata : metadata,
326
318
for_host : true ,
327
319
benched : false ,
328
320
tested : false ,
@@ -340,25 +332,21 @@ impl Target {
340
332
}
341
333
}
342
334
343
- pub fn test_target ( name : & str , src_path : & Path ,
344
- metadata : Metadata ) -> Target {
335
+ pub fn test_target ( name : & str , src_path : & Path ) -> Target {
345
336
Target {
346
337
kind : TargetKind :: Test ,
347
338
name : name. to_string ( ) ,
348
339
src_path : src_path. to_path_buf ( ) ,
349
- metadata : Some ( metadata) ,
350
340
benched : false ,
351
341
..Target :: blank ( )
352
342
}
353
343
}
354
344
355
- pub fn bench_target ( name : & str , src_path : & Path ,
356
- metadata : Metadata ) -> Target {
345
+ pub fn bench_target ( name : & str , src_path : & Path ) -> Target {
357
346
Target {
358
347
kind : TargetKind :: Bench ,
359
348
name : name. to_string ( ) ,
360
349
src_path : src_path. to_path_buf ( ) ,
361
- metadata : Some ( metadata) ,
362
350
tested : false ,
363
351
..Target :: blank ( )
364
352
}
@@ -367,7 +355,6 @@ impl Target {
367
355
pub fn name ( & self ) -> & str { & self . name }
368
356
pub fn crate_name ( & self ) -> String { self . name . replace ( "-" , "_" ) }
369
357
pub fn src_path ( & self ) -> & Path { & self . src_path }
370
- pub fn metadata ( & self ) -> Option < & Metadata > { self . metadata . as_ref ( ) }
371
358
pub fn kind ( & self ) -> & TargetKind { & self . kind }
372
359
pub fn tested ( & self ) -> bool { self . tested }
373
360
pub fn harness ( & self ) -> bool { self . harness }
0 commit comments