Added a new test demonstrating the issue requiring revert

Note, the `Debug` impl is required.
This commit is contained in:
Rich Kadel 2021-06-04 15:14:32 -07:00
parent 2a6dd25265
commit 1384200b1c

View file

@ -430,6 +430,24 @@ mod this_crate2 {
// the patterns are all fine:
(..) = x;
}
#[derive(Debug)]
#[deprecated(note = "Use something else instead")]
enum DeprecatedDebugEnum {
Variant1 { value: Option<String> },
}
#[allow(deprecated)]
impl DeprecatedDebugEnum {
fn new() -> Self {
DeprecatedDebugEnum::Variant1 { value: None }
}
}
#[allow(deprecated)]
pub fn allow_dep() {
let _ = DeprecatedDebugEnum::new();
}
}
fn main() {}