From d44910ceeb03b053a8ff641395c4aff505caaaa6 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Tue, 9 Jan 2018 11:55:28 +0530 Subject: [PATCH] Use the registered def id (makes enum variants link to the enum page instead of not at all) --- src/librustdoc/clean/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 4bc7b81b3f6..97b60e931bc 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -975,8 +975,8 @@ impl Clean for [ast::Attribute] { }; - register_def(cx, def); - attrs.links.push((link, def.def_id())); + let id = register_def(cx, def); + attrs.links.push((link, id)); } cx.sess().abort_if_errors();