Auto merge of #58994 - oli-obk:deprecated_derive, r=petrochenkov
Hide deprecation warnings inside derive expansions Fixes #58822
This commit is contained in:
commit
c82834e2b9
4 changed files with 38 additions and 2 deletions
9
src/test/ui/deprecation/derive_on_deprecated.rs
Normal file
9
src/test/ui/deprecation/derive_on_deprecated.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// compile-pass
|
||||
|
||||
#![deny(deprecated)]
|
||||
|
||||
#[deprecated = "oh no"]
|
||||
#[derive(Default)]
|
||||
struct X;
|
||||
|
||||
fn main() {}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
// compile-pass
|
||||
|
||||
#![forbid(deprecated)]
|
||||
|
||||
#[deprecated = "oh no"]
|
||||
#[derive(Default)]
|
||||
struct X;
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue