Skip to content

Add stable macro #10

@joshka

Description

@joshka

I was implementing a new feature in Ratatui and was going to write a manual doc comment about when it was introduced, but it struck me that the way that this is is handled in the Rust Standard Lib is with a macro named stable. E.g.:

#![stable(feature = "alloc_module", since = "1.28.0")]

Produces https://doc.rust-lang.org/nightly/alloc/alloc/index.html

While I don't think we can hook into the rustdoc rendering to make this actually spit the version info in the top right corner, we can probably add some small amount of html to the bottom of the item's docs that states the version number that something was introduced in.

Recently there have been conversations with newer Ratatui users that don't have the context of when new things were added. This would be a helpful tool to make this part of the standard way that we document new functionality (and would save having to look for changelogs etc. to find out when something was implemented).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions