mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 09:23:05 +00:00
Add tcx
local variable
This commit is contained in:
parent
db3a06d01e
commit
8048c70568
@ -1540,9 +1540,10 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let param_env = cx.tcx().param_env(ty_def_id);
|
let tcx = cx.tcx();
|
||||||
let ty = cx.tcx().type_of(ty_def_id);
|
let param_env = tcx.param_env(ty_def_id);
|
||||||
match cx.tcx().layout_of(param_env.and(ty)) {
|
let ty = tcx.type_of(ty_def_id);
|
||||||
|
match tcx.layout_of(param_env.and(ty)) {
|
||||||
Ok(ty_layout) => {
|
Ok(ty_layout) => {
|
||||||
writeln!(w, "<h2 class=\"small-section-header\">Layout</h2>");
|
writeln!(w, "<h2 class=\"small-section-header\">Layout</h2>");
|
||||||
writeln!(w, "<div class=\"docblock\">");
|
writeln!(w, "<div class=\"docblock\">");
|
||||||
|
Loading…
Reference in New Issue
Block a user