Skip to content

docs: Missing Generics section. #9023

Closed
@toqueteos

Description

@toqueteos

Most "generic" mentions on manual are for "generic functions", a new section, similar to the one found on the tutorial would be a nice addition.

There are more than generic functions and traits, e.g:

struct Stack<T> {
    elements: ~[T]
}

enum Option<T> {
    Some(T),
    None
}

That new section would be a nice place to write a grammar for generic declarations, which would be definitely helpful for #9022.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-grammarArea: The grammar of Rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions