Skip to content

Commit 2683ba6

Browse files
committed
Appease tidy and fix save-analysis config for dist builds
1 parent 5abbf79 commit 2683ba6

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/bootstrap/bin/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ fn main() {
188188
cmd.arg("-Zsave-analysis");
189189
cmd.env("RUST_SAVE_ANALYSIS_CONFIG",
190190
"{\"output_file\": null,\"full_docs\": false,\"pub_only\": true,\
191-
\"signatures\": false,\"borrow_data\": false}");
191+
\"distro_crate\": true,\"signatures\": false,\"borrow_data\": false}");
192192
}
193193

194194
// Dealing with rpath here is a little special, so let's go into some

src/librustc_save_analysis/dump_visitor.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -561,17 +561,18 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
561561
if let ast::ItemKind::Struct(ast::VariantData::Struct(ref fields, _), _) = item.node
562562
{
563563
let include_priv_fields = !self.save_ctxt.config.pub_only;
564-
let fields_str = fields.iter()
565-
.enumerate()
566-
.filter_map(|(i, f)| {
567-
if include_priv_fields || f.vis == ast::Visibility::Public {
568-
f.ident.map(|i| i.to_string()).or_else(|| Some(i.to_string()))
569-
} else {
570-
None
571-
}
572-
})
573-
.collect::<Vec<_>>()
574-
.join(", ");
564+
let fields_str = fields
565+
.iter()
566+
.enumerate()
567+
.filter_map(|(i, f)| {
568+
if include_priv_fields || f.vis == ast::Visibility::Public {
569+
f.ident.map(|i| i.to_string()).or_else(|| Some(i.to_string()))
570+
} else {
571+
None
572+
}
573+
})
574+
.collect::<Vec<_>>()
575+
.join(", ");
575576
let value = format!("{} {{ {} }}", name, fields_str);
576577
(value, fields.iter().map(|f| ::id_from_node_id(f.id, &self.save_ctxt)).collect())
577578
} else {

0 commit comments

Comments
 (0)