<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="224362" data-post-id="224362">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shahryarjb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shahryarjb/120/39485_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shahryarjb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Eiji" data-post="5" data-topic="20463">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p><code>  @doc delegate_to: {MyBehaviour, :foo, 0}</code></p>
</blockquote>
</aside>
<p>Hi, I want to use <code>@doc delegate_to:</code> of a macro, but it doesn’t show me the doc I need</p>
<h3><a name="p-224362-my-macro-and-its-doc-1" class="anchor" href="#p-224362-my-macro-and-its-doc-1" aria-label="Heading link" rel="nofollow"></a>my macro and its doc</h3>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MishkaDatabase.CRUD
  @doc """
  ### Creating a record macro
  """
  defmacro crud_add(attrs)
  ...
  end
end
</code></pre>
<h3><a name="p-224362-and-my-function-that-needs-to-use-delegate-doc-2" class="anchor" href="#p-224362-and-my-function-that-needs-to-use-delegate-doc-2" aria-label="Heading link" rel="nofollow"></a>and my function that needs to use <code>delegate doc</code>:</h3>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MishkaDatabase.Public.Setting do
  @behaviour MishkaDatabase.CRUD

  @doc delegate_to: {MishkaDatabase.CRUD, :crud_add, 1}
  def create(attrs) do
    crud_add(attrs)
  end
end
</code></pre>
<p>when I run <code>h</code>, it just shows me <code>@callback</code> like this, not the doc I need</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">iex(25)&gt; h MishkaDatabase.Public.Setting.create
@callback create(record_input()) ::
            {:error, :add, error_tag(), repo_error()}
            | {:ok, :add, error_tag(), repo_data()}
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224362" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-224362" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224362"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="224367" data-post-id="224367">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Looks like a bug. When <code>@callback</code> is used <code>delegate_to</code> option seems to be ignored …</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224367" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-224367" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224367"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="224368" data-post-id="224368">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shahryarjb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shahryarjb/120/39485_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shahryarjb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>When I deleted <code>@callback</code> it just shows this not full document, it doesn’t show full doc?</p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/4/9/49b8d4bf4721b17980c7b03ea0610a263aec4106.png" data-download-href="https://forum.elixirforum.com/uploads/default/49b8d4bf4721b17980c7b03ea0610a263aec4106" title="Screen Shot 1400-06-08 at 21.43.35" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/4/9/49b8d4bf4721b17980c7b03ea0610a263aec4106.png" alt="Screen Shot 1400-06-08 at 21.43.35" data-base62-sha1="awaQWSFveTavycZ2GJZPXesP5pY" width="690" height="108" data-dominant-color="444026"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 1400-06-08 at 21.43.35</span><span class="informations">829×130 9.71 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224368" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-224368" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224368"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="224369" data-post-id="224369">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>As far as I know we do not have any copy-paste documentation mechanism in <code>Elixir</code> which is good as you may want to have it’s own custom documentation here and for further details you should see delegated documentation …</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224369" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-224369" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224369"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="224371" data-post-id="224371">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shahryarjb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shahryarjb/120/39485_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shahryarjb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group quote-modified" data-username="Eiji" data-post="15" data-topic="20463" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/eiji/48/36743_2.png" class="avatar"> Eiji:</div>
<blockquote>
<p>As far as I know we do not have any copy-paste documentation mechanism in <code>Elixir</code> which is good as you may want to have its own custom documentation here and for further details you should see delegated documentation …</p>
</blockquote>
</aside>
<p>If it works like this, we can just put an empty <code>@doc ""</code> to fix the bug concerned, but this feature even is not linked on document after generating just we can see the link on <code>iex</code></p>
<p></p><div class="lightbox-wrapper"><a class="lightbox" href="https://forum.elixirforum.com/uploads/default/original/3X/b/d/bd92203095249d96600feb24ec2a4df1c4635e08.png" data-download-href="https://forum.elixirforum.com/uploads/default/bd92203095249d96600feb24ec2a4df1c4635e08" title="Screen Shot 1400-06-08 at 21.50.44" rel="nofollow"><img src="https://forum.elixirforum.com/uploads/default/original/3X/b/d/bd92203095249d96600feb24ec2a4df1c4635e08.png" alt="Screen Shot 1400-06-08 at 21.50.44" data-base62-sha1="r31jwmKPBbKbnSE5GkSYppKqTRC" width="690" height="137" data-dominant-color="222227"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">Screen Shot 1400-06-08 at 21.50.44</span><span class="informations">884×176 2.87 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><p></p>
<p>Am I right?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224371" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-224371" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224371"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="224376" data-post-id="224376">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Honestly I do not remember … However what you wrote is no longer an <code>Elixir</code> core part, but <code>ex_doc</code> library.</p>
<p>I have created bug report:</p><aside class="onebox githubissue" data-onebox-src="https://github.com/elixir-lang/elixir/issues/11219">
  <header class="source">

      <a href="https://github.com/elixir-lang/elixir/issues/11219" target="_blank" rel="noopener nofollow ugc">github.com/elixir-lang/elixir</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue" data-github-private-repo="false">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/elixir-lang/elixir/issues/11219" target="_blank" rel="noopener nofollow ugc">delegate_to option in @doc seems to be ignored when working with @behaviour</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2021-08-30" data-time="17:21:22" data-timezone="UTC">05:21PM - 30 Aug 21 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2021-08-31" data-time="10:58:09" data-timezone="UTC">10:58AM - 31 Aug 21 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/Eiji7" target="_blank" rel="noopener nofollow ugc">
          <img alt="" src="https://avatars.githubusercontent.com/u/10956022?v=4" class="onebox-avatar-inline" width="20" height="20">
          Eiji7
        </a>
      </div>
    </div>

    <div class="labels">
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">### Environment

```elixir
$ elixir --version
Erlang/OTP 23 [erts-11.2.2.4] <span class="show-more-container"><a href="" rel="noopener nofollow" class="show-more">…</a></span><span class="excerpt hidden">[source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Elixir 1.12.2 (compiled with Erlang/OTP 23)
```

```bash
$ cat /etc/os-release 
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
LOGO=archlinux
```

### Current behavior

Below code gives only `@behaviour` part of documentation and skips `@doc delegate_to`.

```elixir
defmodule Example do
  @callback sample() :: any

  def sample() do
    # any content
  end
end

defmodule Test do
  @behaviour Example

  defdelegate sample(), to: Example
end
```

However if you comment `@behaviour …` line you should see `delegate_to` missing documentation …

### Expected behavior

Both `@behaviour` and `delegate_to` should be shown in documentation.

Originally reported on [Elixir Forum](https://elixirforum.com/t/behaviour-callback-and-spec/20463/12?u=eiji)</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="224376" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-224376" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="224376"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="256210" data-post-id="256210">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="yatender-oktalk" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/yatender-oktalk/120/9766_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  yatender-oktalk
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for the discussion everyone!<br>
it helped me really to read the different perspectives and make decisions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="256210" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/behaviour-callback-and-spec/20463/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-256210" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="256210"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>