       @doc "Function doc"
       assert @doc == "Function doc"
       assert Module.get_attribute(__MODULE__, :doc) == {__ENV__.line - 2, "Function doc"}
+
       def foobar() do
         :ok
       end

  test "compiled without docs" do
    Code.compiler_options(docs: false)

    write_beam(defmodule WithoutDocs do
      @moduledoc "Module doc"

      @doc "Some doc"
      def foobar(arg), do: arg
    end)

    assert Code.get_docs(WithoutDocs, :docs) == nil
    assert Code.get_docs(WithoutDocs, :moduledoc) == nil

Code.require_file("../test_helper.exs", __DIR__)

defmodule Kernel.DocsTest do
  use ExUnit.Case
