Appease tidy and fix save-analysis config for dist builds
This commit is contained in:
parent
5abbf798e7
commit
2683ba631b
@ -188,7 +188,7 @@ fn main() {
|
||||
cmd.arg("-Zsave-analysis");
|
||||
cmd.env("RUST_SAVE_ANALYSIS_CONFIG",
|
||||
"{\"output_file\": null,\"full_docs\": false,\"pub_only\": true,\
|
||||
\"signatures\": false,\"borrow_data\": false}");
|
||||
\"distro_crate\": true,\"signatures\": false,\"borrow_data\": false}");
|
||||
}
|
||||
|
||||
// Dealing with rpath here is a little special, so let's go into some
|
||||
|
@ -561,17 +561,18 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
|
||||
if let ast::ItemKind::Struct(ast::VariantData::Struct(ref fields, _), _) = item.node
|
||||
{
|
||||
let include_priv_fields = !self.save_ctxt.config.pub_only;
|
||||
let fields_str = fields.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(i, f)| {
|
||||
if include_priv_fields || f.vis == ast::Visibility::Public {
|
||||
f.ident.map(|i| i.to_string()).or_else(|| Some(i.to_string()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
let fields_str = fields
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(i, f)| {
|
||||
if include_priv_fields || f.vis == ast::Visibility::Public {
|
||||
f.ident.map(|i| i.to_string()).or_else(|| Some(i.to_string()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
let value = format!("{} {{ {} }}", name, fields_str);
|
||||
(value, fields.iter().map(|f| ::id_from_node_id(f.id, &self.save_ctxt)).collect())
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user