1
Fork 0

Add test for #[unstable] impl for fn() -> !.

This commit is contained in:
Mara Bos 2022-10-19 13:25:37 +02:00
parent a44a22d5f4
commit 5420fa3881
2 changed files with 13 additions and 1 deletions

View file

@ -33,4 +33,8 @@ impl StableTrait for extern "C-unwind" fn() {}
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
impl StableTrait for StableType {}
#[unstable(feature = "k", issue = "none")]
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
impl StableTrait for fn() -> ! {}
fn main() {}

View file

@ -7,6 +7,14 @@ LL | #[unstable(feature = "j", issue = "none")]
= note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
= note: `#[deny(ineffective_unstable_trait_impl)]` on by default
error: an `#[unstable]` annotation here has no effect
--> $DIR/stability-attribute-trait-impl.rs:36:1
|
LL | #[unstable(feature = "k", issue = "none")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information
error: module has missing stability attribute
--> $DIR/stability-attribute-trait-impl.rs:1:1
|
@ -19,5 +27,5 @@ LL | |
LL | | fn main() {}
| |____________^
error: aborting due to 2 previous errors
error: aborting due to 3 previous errors