diff --git a/src/JuMP.jl b/src/JuMP.jl index b26532e9c8e..0f1c97f47c9 100644 --- a/src/JuMP.jl +++ b/src/JuMP.jl @@ -1313,20 +1313,9 @@ function _eval_instances_in_jump(moi_enum) # `eval` the instance as `const name = MOI.name`. eval(Expr(:const, Expr(:(=), name, enum))) # Documentation is not copied for a `const` expression of an object, so - # we need to manually set the docstring in this `@__MODULE__`. + # we need to manually set the docstring. docstr = Docs.docstr(Docs.Binding(MOI, name)) - d = Docs.DocStr( - docstr.text, - nothing, - Dict{Symbol,Any}( - :typesig => Union{}, - :module => @__MODULE__, - :linenumber => @__LINE__, - :binding => getfield(@__MODULE__, name), - :path => @__FILE__, - ), - ) - Docs.doc!(@__MODULE__, Docs.Binding(@__MODULE__, name), d, Union{}) + Docs.doc!(@__MODULE__, Docs.Binding(@__MODULE__, name), docstr) end return end