1 // Copyright 2012-2014 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 // These are attributes of the implicit crate. Really this just needs to parse
12 // for completeness since .rs files linked from .rc files support this
13 // notation to specify their module's attributes
19 #![crate_id="foobar#0.1"]
21 // These are attributes of the following mod
24 mod test_first_item_in_file_mod {}
26 mod test_single_attr_outer {
28 pub static x: int = 10;
42 mod test_multi_attr_outer {
45 pub static x: int = 10;
66 mod test_stmt_single_attr_outer {
86 mod test_stmt_multi_attr_outer {
113 mod test_attr_inner {
115 // This is an attribute of mod m
120 mod test_attr_inner_then_outer {
122 // This is an attribute of mod m
124 // This is an attribute of fn f
130 mod test_attr_inner_then_outer_multi {
132 // This is an attribute of mod m
135 // This is an attribute of fn f
142 mod test_distinguish_syntax_ext {
144 format!("test{}", "s");
150 mod test_other_forms {
154 #[attr(key1 = "val", key2 = "val", attr)]
158 mod test_foreign_items {
166 fn rust_get_test_int() -> libc::intptr_t;
172 // FIXME #623 - these aren't supported yet
173 /*mod test_literals {
178 #![mach_int = 100u32]
180 #![mach_float = 1.0f32]