diff options
| author | bors <bors@rust-lang.org> | 2022-01-29 16:08:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-29 16:08:35 +0000 |
| commit | a00e130dae74a213338e2b095ec855156d8f3d8a (patch) | |
| tree | d8afd415e451e7e736cf2ca49902c67d75207744 /src/librustdoc/html/render/mod.rs | |
| parent | d08e816333281b0c0fb5a99c2c15d8084312e41a (diff) | |
| parent | d62b414b808be3d75204d6b15cf8547643703109 (diff) | |
Auto merge of #93457 - matthiaskrgr:rollup-e43ry1l, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #88205 (Add Explanation For Error E0772) - #92274 (Add `intrinsics::const_deallocate`) - #93236 (Make `NonNull::new` `const`) - #93299 (Fix dot separator when there is no source link) - #93410 (kmc-solid: Implement `net::FileDesc::duplicate`) - #93424 (fix nit) - #93431 (remove unused `jemallocator` crate) - #93453 (Add GUI theme change test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html/render/mod.rs')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 32e4a829184..0b6faa4b13e 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1676,11 +1676,12 @@ fn render_rightside( containing_item.stable_since(tcx), const_stable_since, ); - if has_stability { + let mut tmp_buf = Buffer::empty_from(w); + write_srclink(cx, item, &mut tmp_buf); + if has_stability && !tmp_buf.is_empty() { w.write_str(" ยท "); } - - write_srclink(cx, item, w); + w.push_buffer(tmp_buf); w.write_str("</div>"); } |
