@@ -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 ) ]
@@ -1159,7 +1160,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
1159
1160
assumed." , "[KIND=]NAME" ) ,
1160
1161
opt:: multi_s( "" , "crate-type" , "Comma separated list of types of crates
1161
1162
for the compiler to emit" ,
1162
- "[bin|lib|rlib|dylib|cdylib|staticlib]" ) ,
1163
+ "[bin|lib|rlib|dylib|cdylib|staticlib|metadata ]" ) ,
1163
1164
opt:: opt_s( "" , "crate-name" , "Specify the name of the crate being built" ,
1164
1165
"NAME" ) ,
1165
1166
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
1548
1549
"cdylib" => CrateTypeCdylib ,
1549
1550
"bin" => CrateTypeExecutable ,
1550
1551
"proc-macro" => CrateTypeProcMacro ,
1552
+ "metadata" => CrateTypeMetadata ,
1551
1553
_ => {
1552
1554
return Err ( format ! ( "unknown crate type: `{}`" ,
1553
1555
part) ) ;
@@ -1632,6 +1634,7 @@ impl fmt::Display for CrateType {
1632
1634
CrateTypeStaticlib => "staticlib" . fmt ( f) ,
1633
1635
CrateTypeCdylib => "cdylib" . fmt ( f) ,
1634
1636
CrateTypeProcMacro => "proc-macro" . fmt ( f) ,
1637
+ CrateTypeMetadata => "rmeta" . fmt ( f) ,
1635
1638
}
1636
1639
}
1637
1640
}
0 commit comments