Skip to content

Commit 1bb42e5

Browse files
committed
auto merge of #14956 : nathantypanski/rust/master, r=alexcrichton
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.
2 parents ed33080 + b68fa1a commit 1bb42e5

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/libsyntax/attr.rs

-15
Original file line numberDiff line numberDiff line change
@@ -271,21 +271,6 @@ pub fn sort_meta_items(items: &[Gc<MetaItem>]) -> Vec<Gc<MetaItem>> {
271271
}).collect()
272272
}
273273

274-
/**
275-
* From a list of crate attributes get only the meta_items that affect crate
276-
* linkage
277-
*/
278-
pub fn find_linkage_metas(attrs: &[Attribute]) -> Vec<Gc<MetaItem>> {
279-
let mut result = Vec::new();
280-
for attr in attrs.iter().filter(|at| at.check_name("link")) {
281-
match attr.meta().node {
282-
MetaList(_, ref items) => result.push_all(items.as_slice()),
283-
_ => ()
284-
}
285-
}
286-
result
287-
}
288-
289274
pub fn find_crateid(attrs: &[Attribute]) -> Option<CrateId> {
290275
match first_attr_value_str_by_name(attrs, "crate_id") {
291276
None => None,

0 commit comments

Comments
 (0)