rust/tests/ui/unstable-feature-bound/unstable_inherent_method.rs
Jonathan Brouwer 4bb7bf64e0
Update uitests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-08-14 18:18:42 +02:00

24 lines
595 B
Rust

#![allow(internal_features)]
#![feature(staged_api)]
#![stable(feature = "a", since = "1.1.1" )]
/// FIXME(tiif): we haven't allowed marking trait and impl method as
/// unstable yet, but it should be possible.
#[stable(feature = "a", since = "1.1.1" )]
pub trait Trait {
#[unstable(feature = "feat", issue = "none" )]
#[unstable_feature_bound(foo)]
//~^ ERROR: attribute cannot be used on
fn foo();
}
#[stable(feature = "a", since = "1.1.1" )]
impl Trait for u8 {
#[unstable_feature_bound(foo)]
//~^ ERROR: attribute cannot be used on
fn foo() {}
}
fn main() {}