<p dir="auto">This seems to work ok</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; &quot;doc for my custom struct&quot;
       struct teststruct
           &quot;doc for x&quot;
           x
           &quot;doc for y&quot;
           y
       end
teststruct
help?&gt; teststruct.x
  doc for x"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds">"</span>doc for my custom struct<span class="pl-pds">"</span></span>
       <span class="pl-k">struct</span> teststruct
           <span class="pl-s"><span class="pl-pds">"</span>doc for x<span class="pl-pds">"</span></span>
           x
           <span class="pl-s"><span class="pl-pds">"</span>doc for y<span class="pl-pds">"</span></span>
           y
       <span class="pl-k">end</span>
teststruct
help?<span class="pl-k">&gt;</span> teststruct<span class="pl-k">.</span>x
  doc <span class="pl-k">for</span> x</pre></div>
<p dir="auto">However, the docstrings for fields of a parametric struct brings about an error:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; &quot;doc for my custom parametric struct&quot;
       struct testparametricstruct{T}
           &quot;doc for x&quot;
           x::T
           &quot;doc for y&quot;
           y::Int
       end
testparametricstruct
help?&gt; testparametricstruct.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{testparametricstruct}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:9
Stacktrace:
 [1] top-level scope at /Users/navid/julia/usr/share/julia/stdlib/v1.5/REPL/src/docview.jl:438"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds">"</span>doc for my custom parametric struct<span class="pl-pds">"</span></span>
       <span class="pl-k">struct</span> testparametricstruct{T}
           <span class="pl-s"><span class="pl-pds">"</span>doc for x<span class="pl-pds">"</span></span>
           x<span class="pl-k">::</span><span class="pl-c1">T</span>
           <span class="pl-s"><span class="pl-pds">"</span>doc for y<span class="pl-pds">"</span></span>
           y<span class="pl-k">::</span><span class="pl-c1">Int</span>
       <span class="pl-k">end</span>
testparametricstruct
help?<span class="pl-k">&gt;</span> testparametricstruct<span class="pl-k">.</span>x
ERROR<span class="pl-k">:</span> MethodError<span class="pl-k">:</span> no method matching Base<span class="pl-k">.</span>Docs<span class="pl-k">.</span><span class="pl-c1">Binding</span>(<span class="pl-k">::</span><span class="pl-c1">Type{testparametricstruct}</span>, <span class="pl-k">::</span><span class="pl-c1">Symbol</span>)
Closest candidates are<span class="pl-k">:</span>
  Base<span class="pl-k">.</span>Docs<span class="pl-k">.</span><span class="pl-c1">Binding</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Symbol</span>) at docs<span class="pl-k">/</span>bindings<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">9</span>
Stacktrace<span class="pl-k">:</span>
 [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope at <span class="pl-k">/</span>Users<span class="pl-k">/</span>navid<span class="pl-k">/</span>julia<span class="pl-k">/</span>usr<span class="pl-k">/</span>share<span class="pl-k">/</span>julia<span class="pl-k">/</span>stdlib<span class="pl-k">/</span>v1.<span class="pl-c1">5</span><span class="pl-k">/</span>REPL<span class="pl-k">/</span>src<span class="pl-k">/</span>docview<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">438</span></pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1* (2020-11-09 13:37 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.6.0)
  CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 12"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.5</span>.<span class="pl-c1">3</span>
Commit <span class="pl-c1">788</span>b2c77c1<span class="pl-k">*</span> (<span class="pl-c1">2020</span><span class="pl-k">-</span><span class="pl-c1">11</span><span class="pl-k">-</span><span class="pl-c1">09</span> <span class="pl-c1">13</span><span class="pl-k">:</span><span class="pl-c1">37</span> UTC)
Platform Info<span class="pl-k">:</span>
  OS<span class="pl-k">:</span> macOS (x86_64<span class="pl-k">-</span>apple<span class="pl-k">-</span>darwin19.<span class="pl-c1">6.0</span>)
  CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i7<span class="pl-k">-</span><span class="pl-c1">9750</span>H CPU @ <span class="pl-c1">2.60</span>GHz
  WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
  LIBM<span class="pl-k">:</span> libopenlibm
  LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">9.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)
Environment<span class="pl-k">:</span>
  JULIA_NUM_THREADS <span class="pl-k">=</span> <span class="pl-c1">12</span></pre></div>
<p dir="auto">From <a href="https://discourse.julialang.org/t/documenting-fields-of-parametric-type/15760" rel="nofollow">Discourse</a></p>
<p dir="auto">Trying to get the documentation for <code class="notranslate">Bar.x</code> works, but not <code class="notranslate">Foo.x</code> or <code class="notranslate">Foo{Float64}.x</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# file tmp4.jl
&quot;&quot;&quot;
  This is struct Foo
&quot;&quot;&quot;
struct Foo{T}
  &quot;&quot;&quot;
    This is field x
  &quot;&quot;&quot;
  x
end


&quot;&quot;&quot;
  This is struct Bar
&quot;&quot;&quot;
struct Bar
  &quot;&quot;&quot;
    This is field x
  &quot;&quot;&quot;
  x
end"><pre class="notranslate"><code class="notranslate"># file tmp4.jl
"""
  This is struct Foo
"""
struct Foo{T}
  """
    This is field x
  """
  x
end


"""
  This is struct Bar
"""
struct Bar
  """
    This is field x
  """
  x
end
</code></pre></div>
<p dir="auto">In the repl:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; include(&quot;tmp4.jl&quot;)
Bar

help?&gt; Foo
search: floor pointer_from_objref OverflowError RoundFromZero FileMonitor functionloc StackOverflowError

  This is struct Foo

help?&gt; Foo{Float64}.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo{Float64}}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?&gt; Foo.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?&gt; Bar
search: baremodule SubArray GlobalRef BitArray clipboard backtrace BitMatrix takebuf_array catch_backtrace

  This is struct Bar

help?&gt; Bar.x
  This is field x"><pre class="notranslate"><code class="notranslate">julia&gt; include("tmp4.jl")
Bar

help?&gt; Foo
search: floor pointer_from_objref OverflowError RoundFromZero FileMonitor functionloc StackOverflowError

  This is struct Foo

help?&gt; Foo{Float64}.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo{Float64}}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?&gt; Foo.x
ERROR: MethodError: no method matching Base.Docs.Binding(::Type{Foo}, ::Symbol)
Closest candidates are:
  Base.Docs.Binding(::Module, ::Symbol) at docs/bindings.jl:12

help?&gt; Bar
search: baremodule SubArray GlobalRef BitArray clipboard backtrace BitMatrix takebuf_array catch_backtrace

  This is struct Bar

help?&gt; Bar.x
  This is field x
</code></pre></div>