Skip to content

Commit

Permalink
auto merge of #14956 : nathantypanski/rust/master, r=alexcrichton
Browse files Browse the repository at this point in the history
Closes #14329

Recent-ish uses of `find_linkage_metas` from my `git grep` output are [here](https://gist.github.com/nathantypanski/b9d2d453718a22765f5c), for those interested who wish to tread through the history.
  • Loading branch information
bors committed Jun 17, 2014
2 parents ed33080 + b68fa1a commit 1bb42e5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/libsyntax/attr.rs
Expand Up @@ -271,21 +271,6 @@ pub fn sort_meta_items(items: &[Gc<MetaItem>]) -> Vec<Gc<MetaItem>> {
}).collect()
}

/**
* From a list of crate attributes get only the meta_items that affect crate
* linkage
*/
pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
let mut result = Vec::new();
for attr in attrs.iter().filter(|at| at.check_name("link")) {
match attr.meta().node {
MetaList(_, ref items) => result.push_all(items.as_slice()),
_ => ()
}
}
result
}

pub fn find_crateid(attrs: &[Attribute]) -> Option<CrateId> {
match first_attr_value_str_by_name(attrs, "crate_id") {
None => None,
Expand Down

0 comments on commit 1bb42e5

Please sign in to comment.