1 // Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![crate_name="lint_stability"]
12 #![crate_type = "lib"]
13 #![feature(staged_api)]
14 #![feature(associated_type_defaults)]
15 #![stable(feature = "lint_stability", since = "1.0.0")]
17 #[stable(feature = "stable_test_feature", since = "1.0.0")]
18 #[rustc_deprecated(since = "1.0.0", reason = "text")]
19 pub fn deprecated() {}
20 #[stable(feature = "stable_test_feature", since = "1.0.0")]
21 #[rustc_deprecated(since = "1.0.0", reason = "text")]
22 pub fn deprecated_text() {}
24 #[stable(feature = "stable_test_feature", since = "1.0.0")]
25 #[rustc_deprecated(since = "99.99.99", reason = "text")]
26 pub fn deprecated_future() {}
28 #[unstable(feature = "unstable_test_feature", issue = "0")]
29 #[rustc_deprecated(since = "1.0.0", reason = "text")]
30 pub fn deprecated_unstable() {}
31 #[unstable(feature = "unstable_test_feature", issue = "0")]
32 #[rustc_deprecated(since = "1.0.0", reason = "text")]
33 pub fn deprecated_unstable_text() {}
35 #[unstable(feature = "unstable_test_feature", issue = "0")]
37 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
38 pub fn unstable_text() {}
40 #[stable(feature = "rust1", since = "1.0.0")]
42 #[stable(feature = "rust1", since = "1.0.0")]
43 pub fn stable_text() {}
45 #[stable(feature = "rust1", since = "1.0.0")]
46 pub struct MethodTester;
49 #[stable(feature = "stable_test_feature", since = "1.0.0")]
50 #[rustc_deprecated(since = "1.0.0", reason = "text")]
51 pub fn method_deprecated(&self) {}
52 #[stable(feature = "stable_test_feature", since = "1.0.0")]
53 #[rustc_deprecated(since = "1.0.0", reason = "text")]
54 pub fn method_deprecated_text(&self) {}
56 #[unstable(feature = "unstable_test_feature", issue = "0")]
57 #[rustc_deprecated(since = "1.0.0", reason = "text")]
58 pub fn method_deprecated_unstable(&self) {}
59 #[unstable(feature = "unstable_test_feature", issue = "0")]
60 #[rustc_deprecated(since = "1.0.0", reason = "text")]
61 pub fn method_deprecated_unstable_text(&self) {}
63 #[unstable(feature = "unstable_test_feature", issue = "0")]
64 pub fn method_unstable(&self) {}
65 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
66 pub fn method_unstable_text(&self) {}
68 #[stable(feature = "rust1", since = "1.0.0")]
69 pub fn method_stable(&self) {}
70 #[stable(feature = "rust1", since = "1.0.0")]
71 pub fn method_stable_text(&self) {}
74 #[stable(feature = "stable_test_feature", since = "1.0.0")]
76 #[stable(feature = "stable_test_feature", since = "1.0.0")]
77 #[rustc_deprecated(since = "1.0.0", reason = "text")]
78 fn trait_deprecated(&self) {}
79 #[stable(feature = "stable_test_feature", since = "1.0.0")]
80 #[rustc_deprecated(since = "1.0.0", reason = "text")]
81 fn trait_deprecated_text(&self) {}
83 #[unstable(feature = "unstable_test_feature", issue = "0")]
84 #[rustc_deprecated(since = "1.0.0", reason = "text")]
85 fn trait_deprecated_unstable(&self) {}
86 #[unstable(feature = "unstable_test_feature", issue = "0")]
87 #[rustc_deprecated(since = "1.0.0", reason = "text")]
88 fn trait_deprecated_unstable_text(&self) {}
90 #[unstable(feature = "unstable_test_feature", issue = "0")]
91 fn trait_unstable(&self) {}
92 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "0")]
93 fn trait_unstable_text(&self) {}
95 #[stable(feature = "rust1", since = "1.0.0")]
96 fn trait_stable(&self) {}
97 #[stable(feature = "rust1", since = "1.0.0")]
98 fn trait_stable_text(&self) {}
101 #[stable(feature = "stable_test_feature", since = "1.0.0")]
102 pub trait TraitWithAssociatedTypes {
103 #[unstable(feature = "unstable_test_feature", issue = "0")]
104 type TypeUnstable = u8;
105 #[stable(feature = "stable_test_feature", since = "1.0.0")]
106 #[rustc_deprecated(since = "1.0.0", reason = "text")]
107 type TypeDeprecated = u8;
110 #[stable(feature = "stable_test_feature", since = "1.0.0")]
111 impl Trait for MethodTester {}
113 #[unstable(feature = "unstable_test_feature", issue = "0")]
114 pub trait UnstableTrait { fn dummy(&self) { } }
116 #[stable(feature = "stable_test_feature", since = "1.0.0")]
117 #[rustc_deprecated(since = "1.0.0", reason = "text")]
118 pub trait DeprecatedTrait {
119 #[stable(feature = "stable_test_feature", since = "1.0.0")] fn dummy(&self) { }
122 #[stable(feature = "stable_test_feature", since = "1.0.0")]
123 #[rustc_deprecated(since = "1.0.0", reason = "text")]
124 pub struct DeprecatedStruct {
125 #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
127 #[unstable(feature = "unstable_test_feature", issue = "0")]
128 #[rustc_deprecated(since = "1.0.0", reason = "text")]
129 pub struct DeprecatedUnstableStruct {
130 #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
132 #[unstable(feature = "unstable_test_feature", issue = "0")]
133 pub struct UnstableStruct {
134 #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
136 #[stable(feature = "rust1", since = "1.0.0")]
137 pub struct StableStruct {
138 #[stable(feature = "stable_test_feature", since = "1.0.0")] pub i: isize
140 #[unstable(feature = "unstable_test_feature", issue = "0")]
141 pub enum UnstableEnum {}
142 #[stable(feature = "rust1", since = "1.0.0")]
143 pub enum StableEnum {}
145 #[stable(feature = "stable_test_feature", since = "1.0.0")]
146 #[rustc_deprecated(since = "1.0.0", reason = "text")]
147 pub struct DeprecatedUnitStruct;
148 #[unstable(feature = "unstable_test_feature", issue = "0")]
149 #[rustc_deprecated(since = "1.0.0", reason = "text")]
150 pub struct DeprecatedUnstableUnitStruct;
151 #[unstable(feature = "unstable_test_feature", issue = "0")]
152 pub struct UnstableUnitStruct;
153 #[stable(feature = "rust1", since = "1.0.0")]
154 pub struct StableUnitStruct;
156 #[stable(feature = "stable_test_feature", since = "1.0.0")]
158 #[stable(feature = "stable_test_feature", since = "1.0.0")]
159 #[rustc_deprecated(since = "1.0.0", reason = "text")]
161 #[unstable(feature = "unstable_test_feature", issue = "0")]
162 #[rustc_deprecated(since = "1.0.0", reason = "text")]
163 DeprecatedUnstableVariant,
164 #[unstable(feature = "unstable_test_feature", issue = "0")]
167 #[stable(feature = "rust1", since = "1.0.0")]
171 #[stable(feature = "stable_test_feature", since = "1.0.0")]
172 #[rustc_deprecated(since = "1.0.0", reason = "text")]
173 pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
174 #[unstable(feature = "unstable_test_feature", issue = "0")]
175 #[rustc_deprecated(since = "1.0.0", reason = "text")]
176 pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
177 #[unstable(feature = "unstable_test_feature", issue = "0")]
178 pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
179 #[stable(feature = "rust1", since = "1.0.0")]
180 pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
182 #[stable(feature = "stable_test_feature", since = "1.0.0")]
184 macro_rules! macro_test {
185 () => (deprecated());
188 #[stable(feature = "stable_test_feature", since = "1.0.0")]
190 macro_rules! macro_test_arg {
191 ($func:expr) => ($func);
194 #[stable(feature = "stable_test_feature", since = "1.0.0")]
196 macro_rules! macro_test_arg_nested {
197 ($func:ident) => (macro_test_arg!($func()));