1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // aux-build:internal_unstable.rs
13 #![feature(allow_internal_unstable)]
16 extern crate internal_unstable;
19 ($e: expr, $f: expr) => {{
22 internal_unstable::unstable(); //~ ERROR use of unstable
26 #[allow_internal_unstable]
30 internal_unstable::unstable());
31 internal_unstable::unstable();
36 // ok, the instability is contained.
37 call_unstable_allow!();
38 construct_unstable_allow!(0);
39 |x: internal_unstable::Foo| { call_method_allow!(x) };
40 |x: internal_unstable::Bar| { access_field_allow!(x) };
43 pass_through_allow!(internal_unstable::unstable()); //~ ERROR use of unstable
45 pass_through_noallow!(internal_unstable::unstable()); //~ ERROR use of unstable
49 println!("{:?}", internal_unstable::unstable()); //~ ERROR use of unstable
51 bar!(internal_unstable::unstable()); //~ ERROR use of unstable