@@ -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 ) ]
@@ -1159,7 +1160,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
11591160 assumed." , "[KIND=]NAME" ) ,
11601161 opt:: multi_s( "" , "crate-type" , "Comma separated list of types of crates
11611162 for the compiler to emit" ,
1162- "[bin|lib|rlib|dylib|cdylib|staticlib]" ) ,
1163+ "[bin|lib|rlib|dylib|cdylib|staticlib|metadata ]" ) ,
11631164 opt:: opt_s( "" , "crate-name" , "Specify the name of the crate being built" ,
11641165 "NAME" ) ,
11651166 opt:: multi_s( "" , "emit" , "Comma separated list of types of output for \
@@ -1548,6 +1549,7 @@ pub fn parse_crate_types_from_list(list_list: Vec<String>) -> Result<Vec<CrateTy
15481549 "cdylib" => CrateTypeCdylib ,
15491550 "bin" => CrateTypeExecutable ,
15501551 "proc-macro" => CrateTypeProcMacro ,
1552+ "metadata" => CrateTypeMetadata ,
15511553 _ => {
15521554 return Err ( format ! ( "unknown crate type: `{}`" ,
15531555 part) ) ;
@@ -1632,6 +1634,7 @@ impl fmt::Display for CrateType {
16321634 CrateTypeStaticlib => "staticlib" . fmt ( f) ,
16331635 CrateTypeCdylib => "cdylib" . fmt ( f) ,
16341636 CrateTypeProcMacro => "proc-macro" . fmt ( f) ,
1637+ CrateTypeMetadata => "rmeta" . fmt ( f) ,
16351638 }
16361639 }
16371640}
0 commit comments