2022-10-19 05:41:56 -05:00
|
|
|
#![feature(staged_api, never_type, c_unwind)]
|
2021-07-20 22:23:22 -05:00
|
|
|
//~^ ERROR module has missing stability attribute
|
2020-09-10 13:55:04 -05:00
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[stable(feature = "a", since = "1")]
|
2020-09-10 13:55:04 -05:00
|
|
|
struct StableType;
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "b", issue = "none")]
|
2020-09-10 13:55:04 -05:00
|
|
|
struct UnstableType;
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[stable(feature = "c", since = "1")]
|
2020-09-10 13:55:04 -05:00
|
|
|
trait StableTrait {}
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "d", issue = "none")]
|
2020-09-10 13:55:04 -05:00
|
|
|
trait UnstableTrait {}
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "e", issue = "none")]
|
2020-09-10 13:55:04 -05:00
|
|
|
impl UnstableTrait for UnstableType {}
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "f", issue = "none")]
|
2020-09-10 13:55:04 -05:00
|
|
|
impl StableTrait for UnstableType {}
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "g", issue = "none")]
|
2020-09-10 13:55:04 -05:00
|
|
|
impl UnstableTrait for StableType {}
|
|
|
|
|
2021-07-20 22:23:22 -05:00
|
|
|
#[unstable(feature = "h", issue = "none")]
|
2022-10-19 05:41:56 -05:00
|
|
|
impl StableTrait for ! {}
|
|
|
|
|
|
|
|
// Note: If C-unwind is stabilized, switch this to another (unstable) ABI.
|
|
|
|
#[unstable(feature = "i", issue = "none")]
|
|
|
|
impl StableTrait for extern "C-unwind" fn() {}
|
|
|
|
|
|
|
|
#[unstable(feature = "j", issue = "none")]
|
2021-01-15 14:21:20 -06:00
|
|
|
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
|
2020-09-10 13:55:04 -05:00
|
|
|
impl StableTrait for StableType {}
|
|
|
|
|
2022-10-19 06:25:37 -05:00
|
|
|
#[unstable(feature = "k", issue = "none")]
|
|
|
|
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
|
|
|
|
impl StableTrait for fn() -> ! {}
|
|
|
|
|
2022-10-19 06:33:45 -05:00
|
|
|
#[unstable(feature = "l", issue = "none")]
|
|
|
|
impl StableTrait for fn() -> UnstableType {}
|
|
|
|
|
2020-09-10 13:55:04 -05:00
|
|
|
fn main() {}
|