Skip to content

Commit caf585c

Browse files
committed
Add test of deprecated type in From impl
error: use of deprecated struct `test_deprecated::DeprecatedStruct` --> tests/test_lints.rs:73:13 | 73 | DeprecatedStruct, | ^^^^^^^^^^^^^^^^ | note: the lint level is defined here --> tests/test_lints.rs:39:13 | 39 | #![deny(deprecated)] | ^^^^^^^^^^
1 parent f1f159d commit caf585c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_lints.rs

+10
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ fn test_deprecated() {
6464
Variant,
6565
}
6666

67+
#[derive(Error, Debug)]
68+
pub enum DeprecatedFrom {
69+
#[error(transparent)]
70+
Variant(
71+
#[from]
72+
#[allow(deprecated)]
73+
DeprecatedStruct,
74+
),
75+
}
76+
6777
#[allow(deprecated)]
6878
let _: DeprecatedStruct;
6979
#[allow(deprecated)]

0 commit comments

Comments
 (0)