Update tests for new stability inheritance rules
This commit is contained in:
parent
5b895a833a
commit
8352195426
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user