diff options
| author | est31 <MTest31@outlook.com> | 2022-07-25 00:35:58 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-07-25 19:11:10 +0200 |
| commit | 5fcd2f72feefa22e2c304301a67f448fde21bb7e (patch) | |
| tree | 5713219a2c294377f946a72fe87706441ffe75ed /src/librustdoc/html/render | |
| parent | 2a990f7c0fe4d00042269beb7ee67d0082de4e07 (diff) | |
| download | rust-5fcd2f72feefa22e2c304301a67f448fde21bb7e.tar.gz rust-5fcd2f72feefa22e2c304301a67f448fde21bb7e.zip | |
Add a clickable link to the layout section
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 81cc12c9d55..c6a48d51a56 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -1869,7 +1869,11 @@ fn document_type_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) { return; } - writeln!(w, "<h2 class=\"small-section-header\">Layout</h2>"); + writeln!( + w, + "<h2 id=\"layout\" class=\"small-section-header\"> \ + Layout<a href=\"#layout\" class=\"anchor\"></a></h2>" + ); writeln!(w, "<div class=\"docblock\">"); let tcx = cx.tcx(); |
