Feature gate: #![feature(deprecated_suggestion)]
This is a tracking issue for suggested replacements on deprecations. This has been used as part of the #[rustc_deprecated] attribute since 2019-01-31. The suggestions are machine-applicable, in that cargo fix is capable of making the replacement without further user intervention. As such, the suggestion must be valid Rust (though this is not enforced).
Public API
#![feature(deprecated_suggestion)]
struct Foo;
impl Foo {
#[deprecated(suggestion = "baz")]
fn bar() {}
fn baz() {}
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(deprecated_suggestion)]This is a tracking issue for suggested replacements on deprecations. This has been used as part of the
#[rustc_deprecated]attribute since 2019-01-31. The suggestions are machine-applicable, in thatcargo fixis capable of making the replacement without further user intervention. As such, the suggestion must be valid Rust (though this is not enforced).Public API
Steps / History
#[rustc_deprecated]in Add suggestions to deprecation lints #58002 (merged 2019-01-31)#[deprecated]in Merge#[deprecated]and#[rustc_deprecated]#94635 (merged 2022-03-10)Unresolved Questions