2011-06-15 13:19:50 -05:00
|
|
|
// xfail-stage0
|
2011-06-15 12:28:11 -05:00
|
|
|
|
2011-06-16 15:20:55 -05:00
|
|
|
// These are are attributes of the following mod
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
mod test_first_item_in_file_mod {
|
|
|
|
}
|
|
|
|
|
2011-06-14 20:22:15 -05:00
|
|
|
mod test_single_attr_outer {
|
2011-06-14 18:29:46 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr = "val"]
|
|
|
|
const int x = 10;
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr = "val"]
|
2011-06-15 12:28:11 -05:00
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
mod mod1 {
|
|
|
|
}
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr = "val"]
|
|
|
|
native "rust" mod rustrt { }
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr = "val"]
|
|
|
|
type t = obj { };
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-14 17:39:23 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr = "val"]
|
|
|
|
obj o() { }
|
2011-06-14 18:29:46 -05:00
|
|
|
}
|
|
|
|
|
2011-06-14 20:22:15 -05:00
|
|
|
mod test_multi_attr_outer {
|
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
const int x = 10;
|
2011-06-14 18:29:46 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
2011-06-15 12:28:11 -05:00
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
mod mod1 {
|
|
|
|
}
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
native "rust" mod rustrt { }
|
2011-06-14 20:22:15 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
type t = obj { };
|
2011-06-14 20:22:15 -05:00
|
|
|
|
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
obj o() { }
|
2011-06-14 20:22:15 -05:00
|
|
|
}
|
2011-06-14 18:29:46 -05:00
|
|
|
|
2011-06-15 15:27:39 -05:00
|
|
|
mod test_stmt_single_attr_outer {
|
|
|
|
|
|
|
|
fn f() {
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
const int x = 10;
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
/* FIXME: Issue #493
|
|
|
|
#[attr = "val"]
|
|
|
|
mod mod1 {
|
|
|
|
}
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
native "rust" mod rustrt {
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
type t = obj { };
|
|
|
|
|
|
|
|
#[attr = "val"]
|
|
|
|
obj o() { }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod test_stmt_multi_attr_outer {
|
|
|
|
|
|
|
|
fn f() {
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
const int x = 10;
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
/* FIXME: Issue #493
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
mod mod1 {
|
|
|
|
}
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
native "rust" mod rustrt {
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
type t = obj { };
|
|
|
|
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
obj o() { }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-16 14:19:27 -05:00
|
|
|
mod test_attr_inner {
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
// This is an attribute of mod m
|
|
|
|
#[attr = "val"];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod test_attr_inner_then_outer {
|
|
|
|
|
|
|
|
mod m {
|
|
|
|
// This is an attribute of mod m
|
|
|
|
#[attr = "val"];
|
|
|
|
// This is an attribute of fn f
|
|
|
|
#[attr = "val"]
|
|
|
|
fn f() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod test_attr_inner_then_outer_multi {
|
|
|
|
mod m {
|
|
|
|
// This is an attribute of mod m
|
|
|
|
#[attr1 = "val"];
|
|
|
|
#[attr2 = "val"];
|
|
|
|
// This is an attribute of fn f
|
|
|
|
#[attr1 = "val"]
|
|
|
|
#[attr2 = "val"]
|
|
|
|
fn f() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-15 15:27:39 -05:00
|
|
|
fn main() {
|
|
|
|
}
|
2011-06-16 14:19:27 -05:00
|
|
|
|
|
|
|
//
|
|
|
|
// Local Variables:
|
|
|
|
// mode: rust
|
|
|
|
// fill-column: 78;
|
|
|
|
// indent-tabs-mode: nil
|
|
|
|
// c-basic-offset: 4
|
|
|
|
// buffer-file-coding-system: utf-8-unix
|
|
|
|
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
|
|
|
// End:
|
|
|
|
//
|