summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/auxiliary/lint_stability.rs
blob: 99c29dcdda6777f28e7d8d43438caf2a5881fdfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
#![crate_name="lint_stability"]
#![crate_type = "lib"]
#![feature(staged_api)]
#![feature(associated_type_defaults)]
#![stable(feature = "lint_stability", since = "1.0.0")]

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub fn deprecated() {}
#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub fn deprecated_text() {}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "99.99.99", note = "text")]
pub fn deprecated_future() {}

#[unstable(feature = "unstable_test_feature", issue = "none")]
#[deprecated(since = "1.0.0", note = "text")]
pub fn deprecated_unstable() {}
#[unstable(feature = "unstable_test_feature", issue = "none")]
#[deprecated(since = "1.0.0", note = "text")]
pub fn deprecated_unstable_text() {}

#[unstable(feature = "unstable_test_feature", issue = "none")]
pub fn unstable() {}
#[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
pub fn unstable_text() {}

#[stable(feature = "rust1", since = "1.0.0")]
pub fn stable() {}
#[stable(feature = "rust1", since = "1.0.0")]
pub fn stable_text() {}

#[stable(feature = "rust1", since = "1.0.0")]
pub struct MethodTester;

impl MethodTester {
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    pub fn method_deprecated(&self) {}
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    pub fn method_deprecated_text(&self) {}

    #[unstable(feature = "unstable_test_feature", issue = "none")]
    #[deprecated(since = "1.0.0", note = "text")]
    pub fn method_deprecated_unstable(&self) {}
    #[unstable(feature = "unstable_test_feature", issue = "none")]
    #[deprecated(since = "1.0.0", note = "text")]
    pub fn method_deprecated_unstable_text(&self) {}

    #[unstable(feature = "unstable_test_feature", issue = "none")]
    pub fn method_unstable(&self) {}
    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
    pub fn method_unstable_text(&self) {}

    #[stable(feature = "rust1", since = "1.0.0")]
    pub fn method_stable(&self) {}
    #[stable(feature = "rust1", since = "1.0.0")]
    pub fn method_stable_text(&self) {}
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
pub trait Trait {
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    fn trait_deprecated(&self) {}
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    fn trait_deprecated_text(&self) {}

    #[unstable(feature = "unstable_test_feature", issue = "none")]
    #[deprecated(since = "1.0.0", note = "text")]
    fn trait_deprecated_unstable(&self) {}
    #[unstable(feature = "unstable_test_feature", issue = "none")]
    #[deprecated(since = "1.0.0", note = "text")]
    fn trait_deprecated_unstable_text(&self) {}

    #[unstable(feature = "unstable_test_feature", issue = "none")]
    fn trait_unstable(&self) {}
    #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
    fn trait_unstable_text(&self) {}

    #[stable(feature = "rust1", since = "1.0.0")]
    fn trait_stable(&self) {}
    #[stable(feature = "rust1", since = "1.0.0")]
    fn trait_stable_text(&self) {}
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
pub trait TraitWithAssociatedTypes {
    #[unstable(feature = "unstable_test_feature", issue = "none")]
    type TypeUnstable = u8;
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    type TypeDeprecated = u8;
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
impl Trait for MethodTester {}

#[unstable(feature = "unstable_test_feature", issue = "none")]
pub trait UnstableTrait { fn dummy(&self) { } }

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub trait DeprecatedTrait {
    #[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedStruct {
    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
}
#[unstable(feature = "unstable_test_feature", issue = "none")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedUnstableStruct {
    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
}
#[unstable(feature = "unstable_test_feature", issue = "none")]
pub struct UnstableStruct {
    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
}
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StableStruct {
    #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
}
#[unstable(feature = "unstable_test_feature", issue = "none")]
pub enum UnstableEnum {}
#[stable(feature = "rust1", since = "1.0.0")]
pub enum StableEnum {}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedUnitStruct;
#[unstable(feature = "unstable_test_feature", issue = "none")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedUnstableUnitStruct;
#[unstable(feature = "unstable_test_feature", issue = "none")]
pub struct UnstableUnitStruct;
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StableUnitStruct;

#[stable(feature = "stable_test_feature", since = "1.0.0")]
pub enum Enum {
    #[stable(feature = "stable_test_feature", since = "1.0.0")]
    #[deprecated(since = "1.0.0", note = "text")]
    DeprecatedVariant,
    #[unstable(feature = "unstable_test_feature", issue = "none")]
    #[deprecated(since = "1.0.0", note = "text")]
    DeprecatedUnstableVariant,
    #[unstable(feature = "unstable_test_feature", issue = "none")]
    UnstableVariant,

    #[stable(feature = "rust1", since = "1.0.0")]
    StableVariant,
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
#[unstable(feature = "unstable_test_feature", issue = "none")]
#[deprecated(since = "1.0.0", note = "text")]
pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
#[unstable(feature = "unstable_test_feature", issue = "none")]
pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
#[stable(feature = "rust1", since = "1.0.0")]
pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[macro_export]
macro_rules! macro_test {
    () => (deprecated());
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[macro_export]
macro_rules! macro_test_arg {
    ($func:expr) => ($func);
}

#[stable(feature = "stable_test_feature", since = "1.0.0")]
#[macro_export]
macro_rules! macro_test_arg_nested {
    ($func:ident) => (macro_test_arg!($func()));
}