Skip to content

Support marking trait implementations as unstable #1

@sagebind

Description

@sagebind

It could be useful to mark certain trait implementations as unstable, for example:

// The struct itself is stable...
pub struct MyStruct {
    // ...
}

// But its FromStr implementation is not.
#[stability::unstable(feature = "mystruct-fromstr")]
impl FromStr for MyStruct {
    // etc...
}

I'm not sure that this is really possible to do though in just a macro, since a type either implements a trait or not. I don't think there's a way to implement a trait just within the context of the current crate and not "leak" the implementation to consumers. Maybe some sort of deref/newtype magic would work...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions