Added a new test demonstrating the issue requiring revert
Note, the `Debug` impl is required.
This commit is contained in:
parent
2a6dd25265
commit
1384200b1c
1 changed files with 18 additions and 0 deletions
|
@ -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() {}
|
||||
|
|
Loading…
Reference in a new issue