Skip to content

Commit a44a22d

Browse files
committed
Add test.
1 parent ead96f7 commit a44a22d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/test/ui/stability-attribute/stability-attribute-trait-impl.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(staged_api)]
1+
#![feature(staged_api, never_type, c_unwind)]
22
//~^ ERROR module has missing stability attribute
33

44
#[stable(feature = "a", since = "1")]
@@ -23,6 +23,13 @@ impl StableTrait for UnstableType {}
2323
impl UnstableTrait for StableType {}
2424

2525
#[unstable(feature = "h", issue = "none")]
26+
impl StableTrait for ! {}
27+
28+
// Note: If C-unwind is stabilized, switch this to another (unstable) ABI.
29+
#[unstable(feature = "i", issue = "none")]
30+
impl StableTrait for extern "C-unwind" fn() {}
31+
32+
#[unstable(feature = "j", issue = "none")]
2633
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
2734
impl StableTrait for StableType {}
2835

src/test/ui/stability-attribute/stability-attribute-trait-impl.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
error: an `#[unstable]` annotation here has no effect
2-
--> $DIR/stability-attribute-trait-impl.rs:25:1
2+
--> $DIR/stability-attribute-trait-impl.rs:32:1
33
|
4-
LL | #[unstable(feature = "h", issue = "none")]
4+
LL | #[unstable(feature = "j", issue = "none")]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= 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")]
1010
error: module has missing stability attribute
1111
--> $DIR/stability-attribute-trait-impl.rs:1:1
1212
|
13-
LL | / #![feature(staged_api)]
13+
LL | / #![feature(staged_api, never_type, c_unwind)]
1414
LL | |
1515
LL | |
1616
LL | | #[stable(feature = "a", since = "1")]

0 commit comments

Comments
 (0)