From 6e6bc5076c6824b690204ff3be12273976f2d3d3 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 17 Jun 2011 15:07:34 -0700 Subject: [PATCH] rustc: Support both meta tags and attributes for crate metadata This is a transitional patch for converting from 'meta' to attributes. Issue #487 --- src/comp/back/link.rs | 4 ++++ src/lib/std.rc | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/comp/back/link.rs b/src/comp/back/link.rs index 7bb3f0c7fa62..39247f59a391 100644 --- a/src/comp/back/link.rs +++ b/src/comp/back/link.rs @@ -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)) { diff --git a/src/lib/std.rc b/src/lib/std.rc index 0d07c6a39729..577e62fbd2c6 100644 --- a/src/lib/std.rc +++ b/src/lib/std.rc @@ -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");