diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-22 07:37:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-22 07:37:49 +0900 |
| commit | 83d9b1bb02a22dd85f1eebe4f180cf479d982ec6 (patch) | |
| tree | 6eac587ad96c0553f7edf0f4680ba014e5ea0e32 /src/test/rustdoc | |
| parent | 7dca2e276df7f2babce704f9b757bcfdb788fee1 (diff) | |
| parent | dd90900cf479c0282d023a7c694610e0a2ca3177 (diff) | |
| download | rust-83d9b1bb02a22dd85f1eebe4f180cf479d982ec6.tar.gz rust-83d9b1bb02a22dd85f1eebe4f180cf479d982ec6.zip | |
Rollup merge of #86334 - LeSeulArtichaut:86120-links-type-aliases, r=jyn514
Resolve type aliases to the type they point to in intra-doc links This feels a bit sketchy, but I think it's better than just rejecting the link. Helps with #86120, r? ``@jyn514``
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/intra-doc/type-alias.rs | 19 |
1 files changed, 19 insertions, 0 deletions
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' |
