Skip to content

Disallow Placing Doc-Comments Directly on Variant Fields #759

@InsertCreativityHere

Description

@InsertCreativityHere

Slice currently allows you two different ways to place a doc-comment on the fields of a variant:

enum MyEnum {
    MyVariant(
         /// I can place a doc-comment directly on my field.
        name: string
    )
}

and

enum MyEnum {
    /// @param name: I can place a doc-comment like this too.
    MyVariant(name: string)
}

I propose we drop support for one of these to simplify the syntax, and the information we need to transmit to code-generator plugins, and of the two, I think we should drop support for the first syntax (placing comments directly on fields).

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalslice languageRelated to the Slice language itselfslicecRelated to the 'slicec' crate

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions