foo/
foo.rs

1#[deprecated(since = "1.26.0", note = "deprecated")]
2pub struct DeprecatedStruct;
3
4pub struct NonDeprecatedStruct;
5
6pub trait NormalTrait {
7    #[deprecated(since = "1.26.0", note = "deprecated")]
8    /// doc
9    const X: usize = 12;
10
11    #[deprecated(since = "1.26.0", note = "deprecated")]
12    /// doc
13    fn normal_deprecated_fn();
14}
15
16#[deprecated(since = "1.26.0", note = "deprecated")]
17pub trait DeprecatedTrait {
18    fn depr_deprecated_fn();
19}
20
21impl NonDeprecatedStruct {
22    #[deprecated(since = "1.26.0", note = "deprecated")]
23    /// doc
24    pub fn deprecated_fn() {}
25
26    /// doc
27    pub fn non_deprecated_fn() {}
28}
29
30impl NormalTrait for NonDeprecatedStruct {
31    fn normal_deprecated_fn() {}
32}
33
34impl DeprecatedTrait for NonDeprecatedStruct {
35    fn depr_deprecated_fn() {}
36}