The #[deprecated] attribute marks an item, usually a function, as discouraged because it is no longer the preferred choice. Using it still compiles, but Rust emits a warning. section 13.1.5
Add note = "..." to explain why an item is deprecated, recommend a replacement, or warn that it may later be removed. IDEs may also show deprecated items with strikethrough highlighting. section 13.1.5
Pointing users to a replacement
Mark old_function as deprecated with a note directing users to new_function. Calling old_function produces the full note while the program still compiles.




