Temp commit on the way to making meta_item into an interior vector
This commit is contained in:
@@ -109,9 +109,9 @@ fn in_cfg(&ast::crate_cfg cfg, &ast::attribute[] attrs) -> bool {
|
||||
// so we can match against them. This is the list of configurations for
|
||||
// which the item is valid
|
||||
auto item_cfg_metas = {
|
||||
fn extract_metas(&vec[@ast::meta_item] inner_items,
|
||||
fn extract_metas(&(@ast::meta_item)[] inner_items,
|
||||
&@ast::meta_item cfg_item)
|
||||
-> vec[@ast::meta_item] {
|
||||
-> (@ast::meta_item)[] {
|
||||
|
||||
alt (cfg_item.node) {
|
||||
case (ast::meta_list(?name, ?items)) {
|
||||
@@ -122,13 +122,11 @@ fn in_cfg(&ast::crate_cfg cfg, &ast::attribute[] attrs) -> bool {
|
||||
}
|
||||
}
|
||||
auto cfg_metas = attr::attr_metas(item_cfg_attrs);
|
||||
vec::foldl(extract_metas, [], cfg_metas)
|
||||
ivec::foldl(extract_metas, ~[], cfg_metas)
|
||||
};
|
||||
|
||||
for (@ast::meta_item cfg_mi in item_cfg_metas) {
|
||||
if (attr::contains(cfg, cfg_mi)) {
|
||||
ret true;
|
||||
}
|
||||
if (attr::contains(cfg, cfg_mi)) { ret true; }
|
||||
}
|
||||
|
||||
ret false;
|
||||
|
||||
Reference in New Issue
Block a user