diff options
| author | bors <bors@rust-lang.org> | 2023-02-10 06:20:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-10 06:20:01 +0000 |
| commit | 9b8dbd558c1c4b25c55d987e22baba312ae980ad (patch) | |
| tree | 01a4fc75c18238e8a06732a498dc5b5d6634d1d4 /src/librustdoc | |
| parent | a6975734632c4771edd45ef10e7d4753541d0f3a (diff) | |
| parent | 9300617dab0618896db6eb72ef42c0a180d841b2 (diff) | |
| download | rust-9b8dbd558c1c4b25c55d987e22baba312ae980ad.tar.gz rust-9b8dbd558c1c4b25c55d987e22baba312ae980ad.zip | |
Auto merge of #107870 - matthiaskrgr:rollup-3z1q4rm, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #107043 (Support `true` and `false` as boolean flag params) - #107831 (Query refactoring) - #107841 (Handled snap curl issue inside Rust) - #107852 (rustdoc: remove unused fn parameter `tab`) - #107861 (Sync release notes for 1.67.1) - #107863 (Allow multiple candidates with same response in new solver) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 12 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index c2d24e51484..82a51a8467b 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1109,7 +1109,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea fn item_union(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean::Union) { wrap_item(w, |w| { render_attributes_in_pre(w, it, ""); - render_union(w, it, Some(&s.generics), &s.fields, "", cx); + render_union(w, it, Some(&s.generics), &s.fields, cx); }); document(w, cx, it, None, HeadingOffset::H2); @@ -1628,7 +1628,6 @@ fn render_union( it: &clean::Item, g: Option<&clean::Generics>, fields: &[clean::Item], - tab: &str, cx: &Context<'_>, ) { let tcx = cx.tcx(); @@ -1651,7 +1650,7 @@ fn render_union( w.write_str(" "); } - write!(w, "{{\n{}", tab); + write!(w, "{{\n"); let count_fields = fields.iter().filter(|f| matches!(*f.kind, clean::StructFieldItem(..))).count(); let toggle = should_hide_fields(count_fields); @@ -1663,17 +1662,16 @@ fn render_union( if let clean::StructFieldItem(ref ty) = *field.kind { write!( w, - " {}{}: {},\n{}", + " {}{}: {},\n", visibility_print_with_space(field.visibility(tcx), field.item_id, cx), field.name.unwrap(), - ty.print(cx), - tab + ty.print(cx) ); } } if it.has_stripped_entries().unwrap() { - write!(w, " /* private fields */\n{}", tab); + write!(w, " /* private fields */\n"); } if toggle { toggle_close(w); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 64108c88285..90d6388b70c 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -814,9 +814,9 @@ fn main_args(at_args: &[String]) -> MainResult { sess.fatal("Compilation failed, aborting rustdoc"); } - let mut global_ctxt = abort_on_err(queries.global_ctxt(), sess); + let mut gcx = abort_on_err(queries.global_ctxt(), sess); - global_ctxt.enter(|tcx| { + gcx.enter(|tcx| { let (krate, render_opts, mut cache) = sess.time("run_global_ctxt", || { core::run_global_ctxt( tcx, |
