We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
required-features
SerializedTarget
1 parent 8b6f710 commit 349d264Copy full SHA for 349d264
src/cargo/core/manifest.rs
@@ -229,6 +229,8 @@ struct SerializedTarget<'a> {
229
name: &'a str,
230
src_path: &'a PathBuf,
231
edition: &'a str,
232
+ #[serde(skip_serializing_if = "Option::is_none")]
233
+ required_features: Option<Vec<&'a str>>,
234
}
235
236
impl ser::Serialize for Target {
@@ -238,7 +240,11 @@ impl ser::Serialize for Target {
238
240
crate_types: self.rustc_crate_types(),
239
241
name: &self.name,
242
src_path: &self.src_path.path,
- edition: &self.edition.to_string()
243
+ edition: &self.edition.to_string(),
244
+ required_features: self
245
+ .required_features
246
+ .as_ref()
247
+ .map(|rf| rf.iter().map(|s| &**s).collect()),
248
}.serialize(s)
249
250
0 commit comments