Skip to content

Commit 6e6bc50

Browse files
committed
rustc: Support both meta tags and attributes for crate metadata
This is a transitional patch for converting from 'meta' to attributes. Issue #487
1 parent 81a187e commit 6e6bc50

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/comp/back/link.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ mod write {
249249
*
250250
*/
251251
iter crate_export_metas(&ast::crate c) -> @ast::meta_item {
252+
for (ast::attribute attr in c.node.attrs) {
253+
put @attr.node.value;
254+
}
255+
252256
for (@ast::crate_directive cdir in c.node.directives) {
253257
alt (cdir.node) {
254258
case (ast::cdir_meta(?v, ?mis)) {

src/lib/std.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
meta export (name = "std",
2-
vers = "0.1",
3-
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
4-
url = "http://rust-lang.org/src/std");
1+
#[name = "std"];
2+
#[vers = "0.1"];
3+
#[uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297"];
4+
#[url = "http://rust-lang.org/src/std"];
55

66
meta (comment = "Rust standard library",
77
license = "BSD");

0 commit comments

Comments
 (0)