diff options
| author | Aaron Turon <aturon@mozilla.com> | 2014-11-11 12:52:12 -0800 |
|---|---|---|
| committer | Aaron Turon <aturon@mozilla.com> | 2014-11-11 15:06:54 -0800 |
| commit | 83521954267b3555bfb3a185a187b2c2d929e453 (patch) | |
| tree | 33f012eddec02911d23fd3de3fb92148b16ec475 | |
| parent | 5b895a833a6443046bbc8a6362b1a957cf68d1b4 (diff) | |
| download | rust-83521954267b3555bfb3a185a187b2c2d929e453.tar.gz rust-83521954267b3555bfb3a185a187b2c2d929e453.zip | |
Update tests for new stability inheritance rules
| -rw-r--r-- | src/test/auxiliary/inherited_stability.rs | 12 | ||||
| -rw-r--r-- | src/test/compile-fail/lint-stability.rs | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/test/auxiliary/inherited_stability.rs b/src/test/auxiliary/inherited_stability.rs index 4016a76206b..5691ce3bfa7 100644 --- a/src/test/auxiliary/inherited_stability.rs +++ b/src/test/auxiliary/inherited_stability.rs @@ -18,12 +18,20 @@ pub fn stable() {} #[stable] pub mod stable_mod { - #[experimental] pub fn experimental() {} + #[stable] pub fn stable() {} } +#[unstable] +pub mod unstable_mod { + #[experimental] + pub fn experimental() {} + + pub fn unstable() {} +} + pub mod experimental_mod { pub fn experimental() {} @@ -33,9 +41,9 @@ pub mod experimental_mod { #[stable] pub trait Stable { - #[experimental] fn experimental(&self); + #[stable] fn stable(&self); } diff --git a/src/test/compile-fail/lint-stability.rs b/src/test/compile-fail/lint-stability.rs index 483a3b6d667..ba8559c8008 100644 --- a/src/test/compile-fail/lint-stability.rs +++ b/src/test/compile-fail/lint-stability.rs @@ -165,6 +165,9 @@ mod inheritance { stable_mod::experimental(); //~ ERROR use of experimental item stable_mod::stable(); + unstable_mod::experimental(); //~ ERROR use of experimental item + unstable_mod::unstable(); //~ ERROR use of unstable item + experimental_mod::experimental(); //~ ERROR use of experimental item experimental_mod::stable(); |
