Don't report deprecation lints in derive expansions
This commit is contained in:
parent
2c8bbf50db
commit
a69e12c21b
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