Skip to content

Rollup of 7 pull requests #110666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Apr 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
08f204e
rustdoc: migrate `document_type_layout` to askama
notriddle Apr 4, 2023
5f9746b
rustdoc: use a separate template for type layout size
notriddle Apr 18, 2023
3a16db1
rustdoc: create variants list outside of template
notriddle Apr 18, 2023
e26ae95
rustdoc: format type layout template with newline after `<p>`
notriddle Apr 18, 2023
4375af5
Derive `HashStable` on `GenericArgKind` instead of implementing it by…
WaffleLapkin Apr 20, 2023
b0692a6
compiler/rustc_target: Raise m68k-linux-gnu baseline to 68020
glaubitz Apr 21, 2023
99e1cdb
rustdoc: get rid of redundant, nested `let` lines
notriddle Apr 21, 2023
2b728c1
rustdoc: factor `document_type_layout` into its own module
notriddle Apr 21, 2023
e6664c0
rustdoc: remove unnecessary binding
notriddle Apr 21, 2023
6f29a3c
nit: consistent naming for SimplifyConstCondition
miguelraz Apr 21, 2023
994dd69
rustdoc: use Set for ignored crates, instead of string matching
notriddle Apr 21, 2023
9d69ee0
rustdoc: lift constant string manipulation out of loop
notriddle Apr 21, 2023
0cd3874
rustdoc: clean up redundant search hiding results code
notriddle Apr 21, 2023
56613f8
More `IS_ZST` in `library`
scottmcm Apr 21, 2023
1d7a247
Print ty placeholders pretty
compiler-errors Apr 20, 2023
684bdf8
Rollup merge of #109949 - notriddle:notriddle/type-layout, r=jsha
JohnTitor Apr 22, 2023
9a798e4
Rollup merge of #110622 - WaffleLapkin:hashtag#, r=compiler-errors
JohnTitor Apr 22, 2023
581e741
Rollup merge of #110635 - scottmcm:zst-checks, r=the8472
JohnTitor Apr 22, 2023
18c16b5
Rollup merge of #110640 - glaubitz:m68k-baseline, r=oli-obk
JohnTitor Apr 22, 2023
617ecd2
Rollup merge of #110657 - miguelraz:cleanup-simplifycfg-refactor, r=c…
JohnTitor Apr 22, 2023
c8a3239
Rollup merge of #110659 - notriddle:notriddle/js-cleanup-20230421, r=…
JohnTitor Apr 22, 2023
16e2096
Rollup merge of #110660 - compiler-errors:placeholders-pretty, r=wesl…
JohnTitor Apr 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rustdoc: remove unnecessary binding
  • Loading branch information
notriddle committed Apr 21, 2023
commit e6664c06813b25c2edd923a8a69d57ae98b6083f
9 changes: 4 additions & 5 deletions src/librustdoc/html/render/type_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>(
} else {
span_bug!(cx.tcx().def_span(ty_def_id), "tag is neither niche nor int")
};
let variants = variants
variants
.iter_enumerated()
.map(|(variant_idx, variant_layout)| {
let Adt(adt, _) = type_layout.ty.kind() else {
Expand All @@ -68,12 +68,11 @@ pub(crate) fn document_type_layout<'a, 'cx: 'a>(
let size = variant_layout.size.bytes() - tag_size;
let type_layout_size = TypeLayoutSize { is_unsized, is_uninhabited, size };
(name, type_layout_size)
}).collect();
variants
})
.collect()
} else {
Vec::new()
}
;
};

let type_layout_size = tcx.layout_of(param_env.and(ty)).map(|layout| {
let is_unsized = layout.abi.is_unsized();
Expand Down