From dd90900cf479c0282d023a7c694610e0a2ca3177 Mon Sep 17 00:00:00 2001 From: LeSeulArtichaut Date: Tue, 15 Jun 2021 19:53:50 +0200 Subject: Resolve type aliases to the type they point to in intra-doc links --- src/test/rustdoc/intra-doc/type-alias.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/rustdoc/intra-doc/type-alias.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/intra-doc/type-alias.rs b/src/test/rustdoc/intra-doc/type-alias.rs new file mode 100644 index 00000000000..f3609ccd0a1 --- /dev/null +++ b/src/test/rustdoc/intra-doc/type-alias.rs @@ -0,0 +1,19 @@ +// Regression test for issue #86120. + +#![deny(broken_intra_doc_links)] +#![crate_name = "foo"] + +pub struct Foo; + +/// You should really try [`Self::bar`]! +pub type Bar = Foo; + +impl Bar { + pub fn bar() {} +} + +/// The minimum is [`Self::MIN`]. +pub type Int = i32; + +// @has foo/type.Bar.html '//a[@href="struct.Foo.html#method.bar"]' 'Self::bar' +// @has foo/type.Int.html '//a[@href="{{channel}}/std/primitive.i32.html#associatedconstant.MIN"]' 'Self::MIN' -- cgit 1.4.1-3-g733a5