diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-10-19 12:41:56 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-10-19 12:41:56 +0200 |
| commit | a44a22d5f42d2e81a649d0a019c02f85a803b92f (patch) | |
| tree | 2656eed17cd15c7d8567cc372d1dd3d7dad98933 | |
| parent | ead96f7f749846a2310e7aaedef0ea38fc7c3a4a (diff) | |
| download | rust-a44a22d5f42d2e81a649d0a019c02f85a803b92f.tar.gz rust-a44a22d5f42d2e81a649d0a019c02f85a803b92f.zip | |
Add test.
| -rw-r--r-- | src/test/ui/stability-attribute/stability-attribute-trait-impl.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs b/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs index ce2726ffde4..48fb23ead3b 100644 --- a/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs +++ b/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs @@ -1,4 +1,4 @@ -#![feature(staged_api)] +#![feature(staged_api, never_type, c_unwind)] //~^ ERROR module has missing stability attribute #[stable(feature = "a", since = "1")] @@ -23,6 +23,13 @@ impl StableTrait for UnstableType {} impl UnstableTrait for StableType {} #[unstable(feature = "h", issue = "none")] +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")] //~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl] impl StableTrait for StableType {} diff --git a/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr b/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr index 7645f3c7ef5..037a48f7649 100644 --- a/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr +++ b/src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr @@ -1,7 +1,7 @@ error: an `#[unstable]` annotation here has no effect - --> $DIR/stability-attribute-trait-impl.rs:25:1 + --> $DIR/stability-attribute-trait-impl.rs:32:1 | -LL | #[unstable(feature = "h", issue = "none")] +LL | #[unstable(feature = "j", issue = "none")] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information @@ -10,7 +10,7 @@ LL | #[unstable(feature = "h", issue = "none")] error: module has missing stability attribute --> $DIR/stability-attribute-trait-impl.rs:1:1 | -LL | / #![feature(staged_api)] +LL | / #![feature(staged_api, never_type, c_unwind)] LL | | LL | | LL | | #[stable(feature = "a", since = "1")] |
