• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // @has basic/index.html
2 // @has - '//a/@href' 'struct.ThisType.html'
3 // @has - '//a/@title' 'struct basic::ThisType'
4 // @has - '//a/@href' 'struct.ThisType.html#method.this_method'
5 // @has - '//a/@title' 'method basic::ThisType::this_method'
6 // @has - '//a/@href' 'struct.ThisType.html#method.this_assoc_fn'
7 // @has - '//a/@title' 'associated function basic::ThisType::this_assoc_fn'
8 // @has - '//a/@href' 'enum.ThisEnum.html'
9 // @has - '//a/@title' 'enum basic::ThisEnum'
10 // @has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant'
11 // @has - '//a/@title' 'variant basic::ThisEnum::ThisVariant'
12 // @has - '//a/@href' 'trait.ThisTrait.html'
13 // @has - '//a/@title' 'trait basic::ThisTrait'
14 // @has - '//a/@href' 'trait.ThisTrait.html#tymethod.this_associated_method'
15 // @has - '//a/@title' 'method basic::ThisTrait::this_associated_method'
16 // @has - '//a/@href' 'trait.ThisTrait.html#tymethod.this_associated_fn'
17 // @has - '//a/@title' 'associated function basic::ThisTrait::this_associated_fn'
18 // @has - '//a/@href' 'trait.ThisTrait.html#associatedtype.ThisAssociatedType'
19 // @has - '//a/@title' 'associated type basic::ThisTrait::ThisAssociatedType'
20 // @has - '//a/@href' 'trait.ThisTrait.html#associatedconstant.THIS_ASSOCIATED_CONST'
21 // @has - '//a/@title' 'associated constant basic::ThisTrait::THIS_ASSOCIATED_CONST'
22 // @has - '//a/@href' 'trait.ThisTrait.html'
23 // @has - '//a/@title' 'trait basic::ThisTrait'
24 // @has - '//a/@href' 'type.ThisAlias.html'
25 // @has - '//a/@title' 'type basic::ThisAlias'
26 // @has - '//a/@href' 'union.ThisUnion.html'
27 // @has - '//a/@title' 'union basic::ThisUnion'
28 // @has - '//a/@href' 'fn.this_function.html'
29 // @has - '//a/@title' 'fn basic::this_function'
30 // @has - '//a/@href' 'constant.THIS_CONST.html'
31 // @has - '//a/@title' 'constant basic::THIS_CONST'
32 // @has - '//a/@href' 'static.THIS_STATIC.html'
33 // @has - '//a/@title' 'static basic::THIS_STATIC'
34 // @has - '//a/@href' 'macro.this_macro.html'
35 // @has - '//a/@title' 'macro basic::this_macro'
36 // @has - '//a/@href' 'trait.SoAmbiguous.html'
37 // @has - '//a/@title' 'trait basic::SoAmbiguous'
38 // @has - '//a/@href' 'fn.SoAmbiguous.html'
39 // @has - '//a/@title' 'fn basic::SoAmbiguous'
40 //! In this crate we would like to link to:
41 //!
42 //! * [`ThisType`](ThisType)
43 //! * [`ThisType::this_method`](ThisType::this_method)
44 //! * [`ThisType::this_assoc_fn`](ThisType::this_assoc_fn)
45 //! * [`ThisEnum`](ThisEnum)
46 //! * [`ThisEnum::ThisVariant`](ThisEnum::ThisVariant)
47 //! * [`ThisEnum::ThisVariantCtor`](ThisEnum::ThisVariantCtor)
48 //! * [`ThisTrait`](ThisTrait)
49 //! * [`ThisTrait::this_associated_method`](ThisTrait::this_associated_method)
50 //! * [`ThisTrait::this_associated_fn`](ThisTrait::this_associated_fn)
51 //! * [`ThisTrait::ThisAssociatedType`](ThisTrait::ThisAssociatedType)
52 //! * [`ThisTrait::THIS_ASSOCIATED_CONST`](ThisTrait::THIS_ASSOCIATED_CONST)
53 //! * [`ThisAlias`](ThisAlias)
54 //! * [`ThisUnion`](ThisUnion)
55 //! * [`this_function`](this_function())
56 //! * [`THIS_CONST`](const@THIS_CONST)
57 //! * [`THIS_STATIC`](static@THIS_STATIC)
58 //! * [`this_macro`](this_macro!)
59 //!
60 //! In addition, there's some specifics we want to look at. There's [a trait called
61 //! SoAmbiguous][ambig-trait], but there's also [a function called SoAmbiguous][ambig-fn] too!
62 //! Whatever shall we do?
63 //!
64 //! [ambig-trait]: trait@SoAmbiguous
65 //! [ambig-fn]: SoAmbiguous()
66 
67 #[macro_export]
68 macro_rules! this_macro {
69     () => {};
70 }
71 
72 // @has basic/struct.ThisType.html '//a/@href' 'macro.this_macro.html'
73 /// another link to [`this_macro!()`]
74 pub struct ThisType;
75 
76 impl ThisType {
this_assoc_fn()77     pub fn this_assoc_fn() {}
this_method(self)78     pub fn this_method(self) {}
79 }
80 pub enum ThisEnum { ThisVariant, ThisVariantCtor(u32), }
81 pub trait ThisTrait {
82     type ThisAssociatedType;
83     const THIS_ASSOCIATED_CONST: u8;
this_associated_fn()84     fn this_associated_fn();
this_associated_method(&self)85     fn this_associated_method(&self);
86 }
87 pub type ThisAlias = Result<(), ()>;
88 pub union ThisUnion { this_field: usize, }
89 
this_function()90 pub fn this_function() {}
91 pub const THIS_CONST: usize = 5usize;
92 pub static THIS_STATIC: usize = 5usize;
93 
94 pub trait SoAmbiguous {}
95 
96 #[allow(nonstandard_style)]
SoAmbiguous()97 pub fn SoAmbiguous() {}
98 
99 
100 // @has basic/struct.SomeOtherType.html '//a/@href' 'struct.ThisType.html'
101 // @has - '//a/@href' 'struct.ThisType.html#method.this_method'
102 // @has - '//a/@href' 'enum.ThisEnum.html'
103 // @has - '//a/@href' 'enum.ThisEnum.html#variant.ThisVariant'
104 /// Shortcut links for:
105 /// * [`ThisType`]
106 /// * [`ThisType::this_method`]
107 /// * [ThisEnum]
108 /// * [ThisEnum::ThisVariant]
109 pub struct SomeOtherType;
110