mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +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;
|
||||
}
|
||||
|
||||
let param_env = cx.tcx().param_env(ty_def_id);
|
||||
let ty = cx.tcx().type_of(ty_def_id);
|
||||
match cx.tcx().layout_of(param_env.and(ty)) {
|
||||
let tcx = cx.tcx();
|
||||
let param_env = tcx.param_env(ty_def_id);
|
||||
let ty = tcx.type_of(ty_def_id);
|
||||
match tcx.layout_of(param_env.and(ty)) {
|
||||
Ok(ty_layout) => {
|
||||
writeln!(w, "<h2 class=\"small-section-header\">Layout</h2>");
|
||||
writeln!(w, "<div class=\"docblock\">");
|
||||
|
Loading…
Reference in New Issue
Block a user