blob: c9a9029b0a0605b0251f786f76784686284fa384 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//@ check-pass
#![allow(internal_features)]
#![feature(staged_api)]
#![allow(dead_code)]
#![unstable(feature = "feat_foo", issue = "none" )]
/// In staged-api crate, if feat_foo is only needed to use an impl,
/// having both `feat_foo` and `feat_bar` will still make it pass.
pub trait Foo {
fn foo();
}
pub struct Bar;
// Annotate the impl as unstable.
#[unstable_feature_bound(feat_foo)]
impl Foo for Bar {
fn foo() {}
}
#[unstable_feature_bound(feat_foo, feat_bar)]
fn bar() {
Bar::foo();
}
fn main() {}
|