From 81d792f31d02ac461f5ea3f9f65f14cfc95a0e6f Mon Sep 17 00:00:00 2001 From: moxian Date: Fri, 16 Jul 2021 03:45:27 +0000 Subject: [PATCH] Copy item path rather than full `use` statement. --- src/librustdoc/html/render/print_item.rs | 5 ++--- src/librustdoc/html/static/js/main.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index f7073a8751fa1..58375ab09ade9 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -84,11 +84,10 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer, write!(buf, "{}", item.type_(), item.name.as_ref().unwrap()); write!( buf, - "", static_root_path = page.get_static_root_path(), suffix = page.resource_suffix, diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 38ddbb3ad7427..5917927fb932f 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -985,7 +985,7 @@ function hideThemeButtonState() { }); var el = document.createElement('textarea'); - el.value = 'use ' + path.join('::') + ';'; + el.value = path.join('::'); el.setAttribute('readonly', ''); // To not make it appear on the screen. el.style.position = 'absolute';