diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:06:37 +0000 |
commit | 246f239d9f40f633160f0c18f87a20922d4e77bb (patch) | |
tree | 5a88572663584b3d4d28e5a20e10abab1be40884 /src/test/rustdoc-json/intra-doc-links/non_page.rs | |
parent | Releasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip |
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-json/intra-doc-links/non_page.rs')
-rw-r--r-- | src/test/rustdoc-json/intra-doc-links/non_page.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/test/rustdoc-json/intra-doc-links/non_page.rs b/src/test/rustdoc-json/intra-doc-links/non_page.rs new file mode 100644 index 000000000..73c5334bb --- /dev/null +++ b/src/test/rustdoc-json/intra-doc-links/non_page.rs @@ -0,0 +1,34 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/101531>, +// where links where to the item who's HTML page had the item linked to. + +//! [`Struct::struct_field`] +//! [`Enum::Variant`] +//! [`Trait::AssocType`] +//! [`Trait::ASSOC_CONST`] +//! [`Trait::method`] + +// @set struct_field = "$.index[*][?(@.name=='struct_field')].id" +// @set Variant = "$.index[*][?(@.name=='Variant')].id" +// @set AssocType = "$.index[*][?(@.name=='AssocType')].id" +// @set ASSOC_CONST = "$.index[*][?(@.name=='ASSOC_CONST')].id" +// @set method = "$.index[*][?(@.name=='method')].id" + +// @is "$.index[*][?(@.name=='non_page')].links['`Struct::struct_field`']" $struct_field +// @is "$.index[*][?(@.name=='non_page')].links['`Enum::Variant`']" $Variant +// @is "$.index[*][?(@.name=='non_page')].links['`Trait::AssocType`']" $AssocType +// @is "$.index[*][?(@.name=='non_page')].links['`Trait::ASSOC_CONST`']" $ASSOC_CONST +// @is "$.index[*][?(@.name=='non_page')].links['`Trait::method`']" $method + +pub struct Struct { + pub struct_field: i32, +} + +pub enum Enum { + Variant(), +} + +pub trait Trait { + const ASSOC_CONST: i32; + type AssocType; + fn method(); +} |