Open
Description
When deprecating an item, you typically still want the helper methods supporting it to work without the compiler whining that the item is deprecated.
I tried this code: playground
#[deprecated]
pub struct Foo;
impl Foo {
fn foo() -> Foo { Foo }
}
I expected to see this happen: The code compiles without deprecation warnings.
Instead, this happened: Litterally every usage of Foo
gets a use of deprecated item Foo
warning.
The fact that I'm deprecating an item doesn't mean the crate itself should now be spammed with deprecation warnings. Working around it by either a global #![allow(deprecated)]
will swallow legitimate deprecation warnings or require all uses to be tagged with it.
Meta
Playground, all channels (how do you get the version info from the playground?)