rustc: Support both meta tags and attributes for crate metadata
This is a transitional patch for converting from 'meta' to attributes. Issue #487
This commit is contained in:
parent
81a187e8be
commit
6e6bc5076c
@ -249,6 +249,10 @@ mod write {
|
||||
*
|
||||
*/
|
||||
iter crate_export_metas(&ast::crate c) -> @ast::meta_item {
|
||||
for (ast::attribute attr in c.node.attrs) {
|
||||
put @attr.node.value;
|
||||
}
|
||||
|
||||
for (@ast::crate_directive cdir in c.node.directives) {
|
||||
alt (cdir.node) {
|
||||
case (ast::cdir_meta(?v, ?mis)) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
meta export (name = "std",
|
||||
vers = "0.1",
|
||||
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
|
||||
url = "http://rust-lang.org/src/std");
|
||||
#[name = "std"];
|
||||
#[vers = "0.1"];
|
||||
#[uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297"];
|
||||
#[url = "http://rust-lang.org/src/std"];
|
||||
|
||||
meta (comment = "Rust standard library",
|
||||
license = "BSD");
|
||||
|
Loading…
Reference in New Issue
Block a user