@@ -1354,7 +1354,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1354
1354
} ;
1355
1355
1356
1356
let unparsed_crate_types = matches. opt_strs ( "crate-type" ) ;
1357
- let ( crate_types, emit_metadata ) = parse_crate_types_from_list ( unparsed_crate_types)
1357
+ let crate_types = parse_crate_types_from_list ( unparsed_crate_types)
1358
1358
. unwrap_or_else ( |e| early_error ( error_format, & e[ ..] ) ) ;
1359
1359
1360
1360
let mut lint_opts = vec ! [ ] ;
@@ -1402,9 +1402,7 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1402
1402
}
1403
1403
}
1404
1404
} ;
1405
- if emit_metadata {
1406
- output_types. insert ( OutputType :: Metadata , None ) ;
1407
- } else if output_types. is_empty ( ) {
1405
+ if output_types. is_empty ( ) {
1408
1406
output_types. insert ( OutputType :: Exe , None ) ;
1409
1407
}
1410
1408
@@ -1629,9 +1627,8 @@ pub fn build_session_options_and_crate_config(matches: &getopts::Matches)
1629
1627
}
1630
1628
1631
1629
pub fn parse_crate_types_from_list ( list_list : Vec < String > )
1632
- -> Result < ( Vec < CrateType > , bool ) , String > {
1630
+ -> Result < Vec < CrateType > , String > {
1633
1631
let mut crate_types: Vec < CrateType > = Vec :: new ( ) ;
1634
- let mut emit_metadata = false ;
1635
1632
for unparsed_crate_type in & list_list {
1636
1633
for part in unparsed_crate_type. split ( ',' ) {
1637
1634
let new_part = match part {
@@ -1642,13 +1639,6 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>)
1642
1639
"cdylib" => CrateTypeCdylib ,
1643
1640
"bin" => CrateTypeExecutable ,
1644
1641
"proc-macro" => CrateTypeProcMacro ,
1645
- // FIXME(#38640) remove this when Cargo is fixed.
1646
- "metadata" => {
1647
- early_warn ( ErrorOutputType :: default ( ) , "--crate-type=metadata is deprecated, \
1648
- prefer --emit=metadata") ;
1649
- emit_metadata = true ;
1650
- CrateTypeRlib
1651
- }
1652
1642
_ => {
1653
1643
return Err ( format ! ( "unknown crate type: `{}`" ,
1654
1644
part) ) ;
@@ -1660,7 +1650,7 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>)
1660
1650
}
1661
1651
}
1662
1652
1663
- return Ok ( ( crate_types, emit_metadata ) ) ;
1653
+ Ok ( crate_types)
1664
1654
}
1665
1655
1666
1656
pub mod nightly_options {
0 commit comments