]> git.lizzy.rs Git - rust.git/commitdiff
Add test.
authorMara Bos <m-ou.se@m-ou.se>
Wed, 19 Oct 2022 10:41:56 +0000 (12:41 +0200)
committerMara Bos <m-ou.se@m-ou.se>
Wed, 19 Oct 2022 10:41:56 +0000 (12:41 +0200)
src/test/ui/stability-attribute/stability-attribute-trait-impl.rs
src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr

index ce2726ffde48737c93ce3f6e36804c3d2e8f3d0b..48fb23ead3b4505d0b62f2abbf00ef7891f904be 100644 (file)
@@ -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 {}
 
index 7645f3c7ef514ae5e8058b2c3296e8a9b3a3b924..037a48f7649a47a820e7a5bbe87a9c492ec63c1c 100644 (file)
@@ -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")]