Skip to content

Commit

Permalink
Update tests for new stability inheritance rules
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Nov 11, 2014
1 parent 5b895a8 commit 8352195
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/test/auxiliary/inherited_stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

Expand All @@ -33,9 +41,9 @@ pub mod experimental_mod {

#[stable]
pub trait Stable {
#[experimental]
fn experimental(&self);

#[stable]
fn stable(&self);
}

Expand Down
3 changes: 3 additions & 0 deletions src/test/compile-fail/lint-stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 8352195

Please sign in to comment.