]>
Commit | Line | Data |
---|---|---|
c34b1796 AL |
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. | |
4 | // | |
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. | |
10 | ||
11 | // this has to be separate to internal-unstable.rs because these tests | |
12 | // have error messages pointing deep into the internals of the | |
13 | // cross-crate macros, and hence need to use error-pattern instead of | |
14 | // the // ~ form. | |
15 | ||
16 | // aux-build:internal_unstable.rs | |
17 | // error-pattern:use of unstable library feature 'function' | |
18 | // error-pattern:use of unstable library feature 'struct_field' | |
9346a6ac AL |
19 | // error-pattern:use of unstable library feature 'method' |
20 | // error-pattern:use of unstable library feature 'struct2_field' | |
c34b1796 AL |
21 | |
22 | #[macro_use] | |
23 | extern crate internal_unstable; | |
24 | ||
25 | fn main() { | |
26 | call_unstable_noallow!(); | |
27 | ||
28 | construct_unstable_noallow!(0); | |
9346a6ac AL |
29 | |
30 | |x: internal_unstable::Foo| { call_method_noallow!(x) }; | |
31 | ||
32 | |x: internal_unstable::Bar| { access_field_noallow!(x) }; | |
c34b1796 | 33 | } |