diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2017-12-21 15:15:48 -0600 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-22 15:21:28 +0530 |
| commit | d9c1a17eecf7539368e541958f95562a81fd600a (patch) | |
| tree | d95c3d3ffc047d9d8d79dd647d237c4e9e039e95 | |
| parent | 5db40f775415a9c006a14ebe65b88bcee31976ea (diff) | |
| download | rust-d9c1a17eecf7539368e541958f95562a81fd600a.tar.gz rust-d9c1a17eecf7539368e541958f95562a81fd600a.zip | |
give render_text a generic return type
| -rw-r--r-- | src/librustdoc/html/render.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index cfa09ea30a8..f335e073d56 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -421,7 +421,7 @@ thread_local!(pub static CURRENT_LOCATION_KEY: RefCell<Vec<String>> = thread_local!(pub static USED_ID_MAP: RefCell<FxHashMap<String, usize>> = RefCell::new(init_ids())); -pub fn render_text<F: FnMut(RenderType) -> String>(mut render: F) -> (String, String) { +pub fn render_text<T, F: FnMut(RenderType) -> T>(mut render: F) -> (T, T) { // Save the state of USED_ID_MAP so it only gets updated once even // though we're rendering twice. let orig_used_id_map = USED_ID_MAP.with(|map| map.borrow().clone()); |
