Update tests for new stability inheritance rules

This commit is contained in:
Aaron Turon 2014-11-11 12:52:12 -08:00
parent 5b895a833a
commit 8352195426
2 changed files with 13 additions and 2 deletions

View File

@ -18,10 +18,18 @@ pub fn stable() {}
#[stable]
pub mod stable_mod {
pub fn experimental() {}
#[stable]
pub fn stable() {}
}
#[unstable]
pub mod unstable_mod {
#[experimental]
pub fn experimental() {}
pub fn stable() {}
pub fn unstable() {}
}
pub mod experimental_mod {
@ -33,9 +41,9 @@ pub fn stable() {}
#[stable]
pub trait Stable {
#[experimental]
fn experimental(&self);
#[stable]
fn stable(&self);
}

View File

@ -165,6 +165,9 @@ fn test_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();