1 // aux-build:internal_unstable.rs
3 #![feature(allow_internal_unstable)]
7 extern crate internal_unstable;
10 #[allow_internal_unstable]
11 //^ WARN `#[allow_internal_unstable]` is ignored on struct fields and match arms
16 ($e: expr, $f: expr) => {{
19 internal_unstable::unstable(); //~ ERROR use of unstable
23 #[allow_internal_unstable(function)]
27 internal_unstable::unstable());
28 internal_unstable::unstable();
33 // ok, the instability is contained.
34 call_unstable_allow!();
35 construct_unstable_allow!(0);
36 |x: internal_unstable::Foo| { call_method_allow!(x) };
37 |x: internal_unstable::Bar| { access_field_allow!(x) };
38 |x: internal_unstable::Bar| { access_field_allow2!(x) }; // regression test for #77088
41 pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of unstable
43 pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of unstable
47 println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unstable
49 bar!(internal_unstable::unstable()); //~ ERROR use of unstable
52 #[allow_internal_unstable]
53 //^ WARN `#[allow_internal_unstable]` is ignored on struct fields and match arms