@@ -78,18 +78,6 @@ pub enum OutputType {
7878 DepInfo ,
7979}
8080
81- #[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
82- pub enum ErrorOutputType {
83- HumanReadable ( ColorConfig ) ,
84- Json ,
85- }
86-
87- impl Default for ErrorOutputType {
88- fn default ( ) -> ErrorOutputType {
89- ErrorOutputType :: HumanReadable ( ColorConfig :: Auto )
90- }
91- }
92-
9381impl OutputType {
9482 fn is_compatible_with_codegen_units_and_single_output_file ( & self ) -> bool {
9583 match * self {
@@ -125,6 +113,18 @@ impl OutputType {
125113 }
126114}
127115
116+ #[ derive( Clone , Copy , Debug , PartialEq , Eq ) ]
117+ pub enum ErrorOutputType {
118+ HumanReadable ( ColorConfig ) ,
119+ Json ,
120+ }
121+
122+ impl Default for ErrorOutputType {
123+ fn default ( ) -> ErrorOutputType {
124+ ErrorOutputType :: HumanReadable ( ColorConfig :: Auto )
125+ }
126+ }
127+
128128// Use tree-based collections to cheaply get a deterministic Hash implementation.
129129// DO NOT switch BTreeMap out for an unsorted container type! That would break
130130// dependency tracking for commandline arguments.
@@ -483,6 +483,7 @@ pub enum CrateType {
483483 CrateTypeStaticlib ,
484484 CrateTypeCdylib ,
485485 CrateTypeProcMacro ,
486+ CrateTypeMetadata ,
486487}
487488
488489#[ derive( Clone , Hash ) ]
@@ -1147,7 +1148,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
11471148 assumed." , "[KIND=]NAME" ) ,
11481149 opt:: multi_s( "" , "crate-type" , "Comma separated list of types of crates
11491150 for the compiler to emit" ,
1150- "[bin|lib|rlib|dylib|cdylib|staticlib]" ) ,
1151+ "[bin|lib|rlib|dylib|cdylib|staticlib|metadata ]" ) ,
11511152 opt:: opt_s( "" , "crate-name" , "Specify the name of the crate being built" ,
11521153 "NAME" ) ,
11531154 opt:: multi_s( "" , "emit" , "Comma separated list of types of output for \
@@ -1539,6 +1540,7 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>) -> Result<Vec<CrateTy
15391540 "cdylib" => CrateTypeCdylib ,
15401541 "bin" => CrateTypeExecutable ,
15411542 "proc-macro" => CrateTypeProcMacro ,
1543+ "metadata" => CrateTypeMetadata ,
15421544 _ => {
15431545 return Err ( format ! ( "unknown crate type: `{}`" ,
15441546 part) ) ;
@@ -1623,6 +1625,7 @@ impl fmt::Display for CrateType {
16231625 CrateTypeStaticlib => "staticlib" . fmt ( f) ,
16241626 CrateTypeCdylib => "cdylib" . fmt ( f) ,
16251627 CrateTypeProcMacro => "proc-macro" . fmt ( f) ,
1628+ CrateTypeMetadata => "metadata" . fmt ( f) ,
16261629 }
16271630 }
16281631}
0 commit comments