diff --git a/src/librustdoc/docfs.rs b/src/librustdoc/docfs.rs index 119059aa4a0f..4ce6bcbe2749 100644 --- a/src/librustdoc/docfs.rs +++ b/src/librustdoc/docfs.rs @@ -36,8 +36,8 @@ pub struct DocFS { } impl DocFS { - pub fn new(errors: &Sender) -> DocFS { - DocFS { sync_only: false, errors: Some(errors.clone()) } + pub fn new(errors: Sender) -> DocFS { + DocFS { sync_only: false, errors: Some(errors) } } pub fn set_sync_only(&mut self, sync_only: bool) { diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 715b5e647649..5fb2d9f6f917 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -462,7 +462,7 @@ impl FormatRenderer for Context { style_files, resource_suffix, static_root_path, - fs: DocFS::new(&sender), + fs: DocFS::new(sender), edition, codes: ErrorCodes::from(UnstableFeatures::from_environment().is_nightly_build()), playground,