mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 10:05:06 +03:00
Added a new test demonstrating the issue requiring revert
Note, the `Debug` impl is required.
This commit is contained in:
@@ -430,6 +430,24 @@ pub fn foo() {
|
||||
// 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() {}
|
||||
|
||||
Reference in New Issue
Block a user