stability
stability copied to clipboard
Support marking trait implementations as unstable
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...