Skip to content

Commit 317d46c

Browse files
committed
---
yaml --- r: 47806 b: refs/heads/incoming c: 1a5b8e4 h: refs/heads/master v: v3
1 parent b179348 commit 317d46c

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 2a8fb58d79e685d5ca07b039badcf2ae3ef077ea
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: bc62bd378251d6dd60f2999cd8c853a75a4e8d02
9+
refs/heads/incoming: 1a5b8e4aba6b28670116897774afde88cf5bee11
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/librustc/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fn fold_mod(cx: @mut TestCtxt,
111111
fn nomain(cx: @mut TestCtxt, item: @ast::item) -> @ast::item {
112112
if !*cx.sess.building_library {
113113
@ast::item{attrs: item.attrs.filtered(|attr| {
114-
attr::get_attr_name(*attr) != ~"main"
114+
attr::get_attr_name(attr) != ~"main"
115115
}),.. copy *item}
116116
} else { item }
117117
}

branches/incoming/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ fn synthesize_crate_attrs(ecx: @encode_ctxt, crate: &crate) -> ~[attribute] {
10971097
let mut found_link_attr = false;
10981098
for crate.node.attrs.each |attr| {
10991099
attrs.push(
1100-
if attr::get_attr_name(*attr) != ~"link" {
1100+
if attr::get_attr_name(attr) != ~"link" {
11011101
/*bad*/copy *attr
11021102
} else {
11031103
match /*bad*/copy attr.node.value.node {

branches/incoming/src/libsyntax/attr.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn desugar_doc_attr(attr: &ast::attribute) -> ast::attribute {
9090

9191
/* Accessors */
9292

93-
pub fn get_attr_name(attr: ast::attribute) -> ~str {
93+
pub fn get_attr_name(attr: &ast::attribute) -> ~str {
9494
get_meta_item_name(@attr.node.value)
9595
}
9696

@@ -146,14 +146,13 @@ pub fn get_name_value_str_pair(item: @ast::meta_item)
146146
/// Search a list of attributes and return only those with a specific name
147147
pub fn find_attrs_by_name(attrs: &[ast::attribute], name: &str) ->
148148
~[ast::attribute] {
149-
let filter: &fn(a: &ast::attribute) -> Option<ast::attribute> = |a| {
150-
if name == get_attr_name(*a) {
151-
option::Some(*a)
149+
do vec::filter_mapped(attrs) |a| {
150+
if name == get_attr_name(a) {
151+
Some(*a)
152152
} else {
153-
option::None
153+
None
154154
}
155-
};
156-
return vec::filter_mapped(attrs, filter);
155+
}
157156
}
158157

159158
/// Search a list of meta items and return only those with a specific name

branches/incoming/src/libsyntax/ext/auto_encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub fn expand_auto_encode(
114114
in_items: ~[@ast::item]
115115
) -> ~[@ast::item] {
116116
fn is_auto_encode(a: &ast::attribute) -> bool {
117-
attr::get_attr_name(*a) == ~"auto_encode"
117+
attr::get_attr_name(a) == ~"auto_encode"
118118
}
119119

120120
fn filter_attrs(item: @ast::item) -> @ast::item {
@@ -169,7 +169,7 @@ pub fn expand_auto_decode(
169169
in_items: ~[@ast::item]
170170
) -> ~[@ast::item] {
171171
fn is_auto_decode(a: &ast::attribute) -> bool {
172-
attr::get_attr_name(*a) == ~"auto_decode"
172+
attr::get_attr_name(a) == ~"auto_decode"
173173
}
174174

175175
fn filter_attrs(item: @ast::item) -> @ast::item {

0 commit comments

Comments
 (0)