]> git.proxmox.com Git - rustc.git/blob - src/test/auxiliary/inherited_stability.rs
77eb82f80228649965299a2e1be76ffe26a84a03
[rustc.git] / src / test / auxiliary / inherited_stability.rs
1 // Copyright 2014 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.
4 //
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="inherited_stability"]
11 #![crate_type = "lib"]
12 #![unstable(feature = "test_feature")]
13 #![feature(staged_api)]
14 #![staged_api]
15
16 pub fn unstable() {}
17
18 #[stable(feature = "rust1", since = "1.0.0")]
19 pub fn stable() {}
20
21 #[stable(feature = "rust1", since = "1.0.0")]
22 pub mod stable_mod {
23 pub fn unstable() {}
24
25 #[stable(feature = "rust1", since = "1.0.0")]
26 pub fn stable() {}
27 }
28
29 #[unstable(feature = "test_feature")]
30 pub mod unstable_mod {
31 #[stable(feature = "test_feature", since = "1.0.0")]
32 #[deprecated(since = "1.0.0")]
33 pub fn deprecated() {}
34
35 pub fn unstable() {}
36 }
37
38 #[stable(feature = "rust1", since = "1.0.0")]
39 pub trait Stable {
40 fn unstable(&self);
41
42 #[stable(feature = "rust1", since = "1.0.0")]
43 fn stable(&self);
44 }
45
46 impl Stable for uint {
47 fn unstable(&self) {}
48 fn stable(&self) {}
49 }
50
51 pub enum Unstable {
52 UnstableVariant,
53 #[stable(feature = "rust1", since = "1.0.0")]
54 StableVariant
55 }