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.
10 #![crate_name="lint_stability"]
11 #![crate_type = "lib"]
12 #![feature(staged_api)]
14 #![stable(feature = "lint_stability", since = "1.0.0")]
16 #[stable(feature = "test_feature", since = "1.0.0")]
17 #[deprecated(since = "1.0.0")]
18 pub fn deprecated() {}
19 #[stable(feature = "test_feature", since = "1.0.0")]
20 #[deprecated(since = "1.0.0", reason = "text")]
21 pub fn deprecated_text() {}
23 #[unstable(feature = "test_feature", issue = "0")]
24 #[deprecated(since = "1.0.0")]
25 pub fn deprecated_unstable() {}
26 #[unstable(feature = "test_feature", issue = "0")]
27 #[deprecated(since = "1.0.0", reason = "text")]
28 pub fn deprecated_unstable_text() {}
30 #[unstable(feature = "test_feature", issue = "0")]
32 #[unstable(feature = "test_feature", reason = "text", issue = "0")]
33 pub fn unstable_text() {}
35 #[stable(feature = "rust1", since = "1.0.0")]
37 #[stable(feature = "rust1", since = "1.0.0", reason = "text")]
38 pub fn stable_text() {}
40 #[stable(feature = "rust1", since = "1.0.0")]
41 pub struct MethodTester;
44 #[stable(feature = "test_feature", since = "1.0.0")]
45 #[deprecated(since = "1.0.0")]
46 pub fn method_deprecated(&self) {}
47 #[stable(feature = "test_feature", since = "1.0.0")]
48 #[deprecated(since = "1.0.0", reason = "text")]
49 pub fn method_deprecated_text(&self) {}
51 #[unstable(feature = "test_feature", issue = "0")]
52 #[deprecated(since = "1.0.0")]
53 pub fn method_deprecated_unstable(&self) {}
54 #[unstable(feature = "test_feature", issue = "0")]
55 #[deprecated(since = "1.0.0", reason = "text")]
56 pub fn method_deprecated_unstable_text(&self) {}
58 #[unstable(feature = "test_feature", issue = "0")]
59 pub fn method_unstable(&self) {}
60 #[unstable(feature = "test_feature", reason = "text", issue = "0")]
61 pub fn method_unstable_text(&self) {}
63 #[stable(feature = "rust1", since = "1.0.0")]
64 pub fn method_stable(&self) {}
65 #[stable(feature = "rust1", since = "1.0.0", reason = "text")]
66 pub fn method_stable_text(&self) {}
69 #[stable(feature = "test_feature", since = "1.0.0")]
71 #[stable(feature = "test_feature", since = "1.0.0")]
72 #[deprecated(since = "1.0.0")]
73 fn trait_deprecated(&self) {}
74 #[stable(feature = "test_feature", since = "1.0.0")]
75 #[deprecated(since = "1.0.0", reason = "text")]
76 fn trait_deprecated_text(&self) {}
78 #[unstable(feature = "test_feature", issue = "0")]
79 #[deprecated(since = "1.0.0")]
80 fn trait_deprecated_unstable(&self) {}
81 #[unstable(feature = "test_feature", issue = "0")]
82 #[deprecated(since = "1.0.0", reason = "text")]
83 fn trait_deprecated_unstable_text(&self) {}
85 #[unstable(feature = "test_feature", issue = "0")]
86 fn trait_unstable(&self) {}
87 #[unstable(feature = "test_feature", reason = "text", issue = "0")]
88 fn trait_unstable_text(&self) {}
90 #[stable(feature = "rust1", since = "1.0.0")]
91 fn trait_stable(&self) {}
92 #[stable(feature = "rust1", since = "1.0.0", reason = "text")]
93 fn trait_stable_text(&self) {}
96 impl Trait for MethodTester {}
98 #[unstable(feature = "test_feature", issue = "0")]
99 pub trait UnstableTrait { fn dummy(&self) { } }
101 #[stable(feature = "test_feature", since = "1.0.0")]
102 #[deprecated(since = "1.0.0")]
103 pub struct DeprecatedStruct {
104 #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
106 #[unstable(feature = "test_feature", issue = "0")]
107 #[deprecated(since = "1.0.0")]
108 pub struct DeprecatedUnstableStruct {
109 #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
111 #[unstable(feature = "test_feature", issue = "0")]
112 pub struct UnstableStruct {
113 #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
115 #[stable(feature = "rust1", since = "1.0.0")]
116 pub struct StableStruct {
117 #[stable(feature = "test_feature", since = "1.0.0")] pub i: isize
120 #[stable(feature = "test_feature", since = "1.0.0")]
121 #[deprecated(since = "1.0.0")]
122 pub struct DeprecatedUnitStruct;
123 #[unstable(feature = "test_feature", issue = "0")]
124 #[deprecated(since = "1.0.0")]
125 pub struct DeprecatedUnstableUnitStruct;
126 #[unstable(feature = "test_feature", issue = "0")]
127 pub struct UnstableUnitStruct;
128 #[stable(feature = "rust1", since = "1.0.0")]
129 pub struct StableUnitStruct;
131 #[stable(feature = "test_feature", since = "1.0.0")]
133 #[stable(feature = "test_feature", since = "1.0.0")]
134 #[deprecated(since = "1.0.0")]
136 #[unstable(feature = "test_feature", issue = "0")]
137 #[deprecated(since = "1.0.0")]
138 DeprecatedUnstableVariant,
139 #[unstable(feature = "test_feature", issue = "0")]
142 #[stable(feature = "rust1", since = "1.0.0")]
146 #[stable(feature = "test_feature", since = "1.0.0")]
147 #[deprecated(since = "1.0.0")]
148 pub struct DeprecatedTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
149 #[unstable(feature = "test_feature", issue = "0")]
150 #[deprecated(since = "1.0.0")]
151 pub struct DeprecatedUnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
152 #[unstable(feature = "test_feature", issue = "0")]
153 pub struct UnstableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
154 #[stable(feature = "rust1", since = "1.0.0")]
155 pub struct StableTupleStruct(#[stable(feature = "rust1", since = "1.0.0")] pub isize);
158 macro_rules! macro_test {
159 () => (deprecated());
163 macro_rules! macro_test_arg {
164 ($func:expr) => ($func);
168 macro_rules! macro_test_arg_nested {
169 ($func:ident) => (macro_test_arg!($func()));