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
16 #![feature(custom_attribute, libc)]
17 #![allow(unused_attribute)]
23 #![crate_id="foobar#0.1"]
25 // These are attributes of the following mod
28 mod test_first_item_in_file_mod {}
30 mod test_single_attr_outer {
32 pub static x: isize = 10;
46 mod test_multi_attr_outer {
49 pub static x: isize = 10;
70 mod test_stmt_single_attr_outer {
90 mod test_stmt_multi_attr_outer {
115 mod test_attr_inner {
117 // This is an attribute of mod m
122 mod test_attr_inner_then_outer {
124 // This is an attribute of mod m
126 // This is an attribute of fn f
132 mod test_attr_inner_then_outer_multi {
134 // This is an attribute of mod m
137 // This is an attribute of fn f
144 mod test_distinguish_syntax_ext {
146 format!("test{}", "s");
152 mod test_other_forms {
156 #[attr(key1 = "val", key2 = "val", attr)]
160 mod test_foreign_items {
168 fn rust_get_test_int() -> libc::intptr_t;
174 // FIXME #623 - these aren't supported yet
175 /*mod test_literals {
179 #![usize = 100_usize]
180 #![mach_int = 100u32]
182 #![mach_float = 1.0f32]