diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index c434087dd2b..2f096346c9b 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -85,6 +85,7 @@ fn try_inline_def(cx: &core::DocContext,
_ => return None,
};
let fqn = csearch::get_item_path(tcx, did);
+ cx.inlined.borrow_mut().get_mut_ref().insert(did);
ret.push(clean::Item {
source: clean::Span::empty(),
name: Some(fqn.last().unwrap().to_str().to_string()),
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 7bc4693215a..27e39e1235c 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -41,6 +41,7 @@ pub struct DocContext {
pub external_paths: ExternalPaths,
pub external_traits: RefCell