@@ -78,18 +78,6 @@ pub enum OutputType {
78
78
DepInfo ,
79
79
}
80
80
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
-
93
81
impl OutputType {
94
82
fn is_compatible_with_codegen_units_and_single_output_file ( & self ) -> bool {
95
83
match * self {
@@ -125,6 +113,18 @@ impl OutputType {
125
113
}
126
114
}
127
115
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
+
128
128
// Use tree-based collections to cheaply get a deterministic Hash implementation.
129
129
// DO NOT switch BTreeMap out for an unsorted container type! That would break
130
130
// dependency tracking for commandline arguments.
@@ -483,6 +483,7 @@ pub enum CrateType {
483
483
CrateTypeStaticlib ,
484
484
CrateTypeCdylib ,
485
485
CrateTypeProcMacro ,
486
+ CrateTypeMetadata ,
486
487
}
487
488
488
489
#[ derive( Clone , Hash ) ]
@@ -1147,7 +1148,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
1147
1148
assumed." , "[KIND=]NAME" ) ,
1148
1149
opt:: multi_s( "" , "crate-type" , "Comma separated list of types of crates
1149
1150
for the compiler to emit" ,
1150
- "[bin|lib|rlib|dylib|cdylib|staticlib]" ) ,
1151
+ "[bin|lib|rlib|dylib|cdylib|staticlib|metadata ]" ) ,
1151
1152
opt:: opt_s( "" , "crate-name" , "Specify the name of the crate being built" ,
1152
1153
"NAME" ) ,
1153
1154
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
1539
1540
"cdylib" => CrateTypeCdylib ,
1540
1541
"bin" => CrateTypeExecutable ,
1541
1542
"proc-macro" => CrateTypeProcMacro ,
1543
+ "metadata" => CrateTypeMetadata ,
1542
1544
_ => {
1543
1545
return Err ( format ! ( "unknown crate type: `{}`" ,
1544
1546
part) ) ;
@@ -1623,6 +1625,7 @@ impl fmt::Display for CrateType {
1623
1625
CrateTypeStaticlib => "staticlib" . fmt ( f) ,
1624
1626
CrateTypeCdylib => "cdylib" . fmt ( f) ,
1625
1627
CrateTypeProcMacro => "proc-macro" . fmt ( f) ,
1628
+ CrateTypeMetadata => "metadata" . fmt ( f) ,
1626
1629
}
1627
1630
}
1628
1631
}
0 commit comments