From 50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 6 Jun 2014 13:21:18 -0700 Subject: rustc: Remove CrateId and all related support This commit removes all support in the compiler for the #[crate_id] attribute and all of its derivative infrastructure. A list of the functionality removed is: * The #[crate_id] attribute no longer exists * There is no longer the concept of a version of a crate * Version numbers are no longer appended to symbol names * The --crate-id command line option has been removed To migrate forward, rename #[crate_id] to #[crate_name] and only the name of the crate itself should be mentioned. The version/path of the old crate id should be removed. For a transitionary state, the #[crate_id] attribute is still accepted if the #[crate_name] is not present, but it is warned about if it is the only identifier present. RFC: 0035-remove-crate-id [breaking-change] --- src/libsyntax/attr.rs | 8 ++------ src/libsyntax/ext/base.rs | 2 +- src/libsyntax/ext/expand.rs | 11 +++++------ 3 files changed, 8 insertions(+), 13 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index a037c0ac07e..3b2ee4e2a61 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -18,7 +18,6 @@ use diagnostic::SpanHandler; use parse::lexer::comments::{doc_comment_style, strip_doc_comment_decoration}; use parse::token::InternedString; use parse::token; -use crateid::CrateId; use std::collections::HashSet; use std::collections::BitvSet; @@ -271,11 +270,8 @@ pub fn sort_meta_items(items: &[Gc]) -> Vec> { }).collect() } -pub fn find_crateid(attrs: &[Attribute]) -> Option { - match first_attr_value_str_by_name(attrs, "crate_id") { - None => None, - Some(id) => from_str::(id.get()), - } +pub fn find_crate_name(attrs: &[Attribute]) -> Option { + first_attr_value_str_by_name(attrs, "crate_name") } #[deriving(PartialEq)] diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index cf69277594f..673ae31ef77 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -452,7 +452,7 @@ impl<'a> ExtCtxt<'a> { pub fn mod_pop(&mut self) { self.mod_path.pop().unwrap(); } pub fn mod_path(&self) -> Vec { let mut v = Vec::new(); - v.push(token::str_to_ident(self.ecfg.crate_id.name.as_slice())); + v.push(token::str_to_ident(self.ecfg.crate_name.as_slice())); v.extend(self.mod_path.iter().map(|a| *a)); return v; } diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs index b30b62c8901..752b3a09e65 100644 --- a/src/libsyntax/ext/expand.rs +++ b/src/libsyntax/ext/expand.rs @@ -19,7 +19,6 @@ use attr; use attr::AttrMetaMethods; use codemap; use codemap::{Span, Spanned, ExpnInfo, NameAndSpan, MacroBang, MacroAttribute}; -use crateid::CrateId; use ext::base::*; use fold; use fold::*; @@ -985,7 +984,7 @@ fn new_span(cx: &ExtCtxt, sp: Span) -> Span { pub struct ExpansionConfig { pub deriving_hash_type_parameter: bool, - pub crate_id: CrateId, + pub crate_name: String, } pub struct ExportedMacros { @@ -1184,7 +1183,7 @@ mod test { // should fail: let cfg = ::syntax::ext::expand::ExpansionConfig { deriving_hash_type_parameter: false, - crate_id: from_str("test").unwrap(), + crate_name: "test".to_str(), }; expand_crate(&sess,cfg,vec!(),vec!(),crate_ast); } @@ -1201,7 +1200,7 @@ mod test { Vec::new(), &sess); let cfg = ::syntax::ext::expand::ExpansionConfig { deriving_hash_type_parameter: false, - crate_id: from_str("test").unwrap(), + crate_name: "test".to_str(), }; expand_crate(&sess,cfg,vec!(),vec!(),crate_ast); } @@ -1217,7 +1216,7 @@ mod test { Vec::new(), &sess); let cfg = ::syntax::ext::expand::ExpansionConfig { deriving_hash_type_parameter: false, - crate_id: from_str("test").unwrap(), + crate_name: "test".to_str(), }; expand_crate(&sess, cfg, vec!(), vec!(), crate_ast); } @@ -1254,7 +1253,7 @@ mod test { // the cfg argument actually does matter, here... let cfg = ::syntax::ext::expand::ExpansionConfig { deriving_hash_type_parameter: false, - crate_id: from_str("test").unwrap(), + crate_name: "test".to_str(), }; expand_crate(&ps,cfg,vec!(),vec!(),crate_ast) } -- cgit 1.4.1-3-g733a5 From e44c2b9bbcb3ca7a7ca9e987b6727fd011f7b91a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 1 Jul 2014 07:12:04 -0700 Subject: Add #[crate_name] attributes as necessary --- src/liballoc/lib.rs | 4 +++- src/libarena/lib.rs | 2 ++ src/libcollections/lib.rs | 4 +++- src/libcore/lib.rs | 2 ++ src/libdebug/lib.rs | 4 +++- src/libflate/lib.rs | 4 +++- src/libfmt_macros/lib.rs | 4 +++- src/libfourcc/lib.rs | 4 +++- src/libgetopts/lib.rs | 4 +++- src/libglob/lib.rs | 4 +++- src/libgraphviz/lib.rs | 6 +++--- src/libgreen/lib.rs | 10 +++++----- src/libhexfloat/lib.rs | 4 +++- src/liblibc/lib.rs | 4 +++- src/liblog/lib.rs | 5 +++-- src/libnative/lib.rs | 4 +++- src/libnum/lib.rs | 5 +++-- src/librand/lib.rs | 4 +++- src/libregex/lib.rs | 4 +++- src/libregex_macros/lib.rs | 4 +++- src/librlibc/lib.rs | 4 +++- src/librustc/lib.rs | 4 +++- src/librustrt/lib.rs | 4 +++- src/librustuv/lib.rs | 4 +++- src/libsemver/lib.rs | 4 +++- src/libserialize/lib.rs | 4 +++- src/libstd/lib.rs | 4 +++- src/libsync/lib.rs | 4 +++- src/libsyntax/lib.rs | 4 +++- src/libterm/lib.rs | 4 +++- src/libtest/lib.rs | 4 +++- src/libtime/lib.rs | 4 +++- src/liburl/lib.rs | 4 +++- src/libuuid/lib.rs | 4 +++- 34 files changed, 102 insertions(+), 40 deletions(-) (limited to 'src/libsyntax') diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 26b8ccaf573..3e403d122ac 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -60,7 +60,8 @@ //! by libc malloc/free. The `libc_heap` module is defined to be wired up to //! the system malloc/free. -#![crate_id = "alloc#0.11.0"] +#![crate_id = "alloc#0.11.0"] // NOTE: remove after a stage0 snap +#![crate_name = "alloc"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -70,6 +71,7 @@ #![no_std] #![feature(lang_items, phase, unsafe_destructor)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[phase(plugin, link)] extern crate core; diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 917de94470b..51eacd3fb4e 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -20,6 +20,7 @@ //! more complex, slower Arena which can hold objects of any type. #![crate_id = "arena#0.11.0"] +#![crate_name = "arena"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -30,6 +31,7 @@ #![feature(unsafe_destructor)] #![allow(missing_doc)] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::cell::{Cell, RefCell}; use std::cmp; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index c698b35c848..d9a62cd9acd 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -12,7 +12,8 @@ * Collection types. */ -#![crate_id = "collections#0.11.0"] +#![crate_id = "collections#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "collections"] #![experimental] #![crate_type = "rlib"] #![license = "MIT/ASL2"] @@ -24,6 +25,7 @@ #![feature(macro_rules, managed_boxes, default_type_params, phase, globs)] #![feature(unsafe_destructor)] #![no_std] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[phase(plugin, link)] extern crate core; extern crate alloc; diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 5e238aeae32..6966c96b30b 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -48,6 +48,7 @@ // separate crate, libcoretest, to avoid bizarre issues. #![crate_id = "core#0.11.0"] +#![crate_name = "core"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -60,6 +61,7 @@ #![feature(globs, intrinsics, lang_items, macro_rules, managed_boxes, phase)] #![feature(simd, unsafe_destructor)] #![deny(missing_doc)] +#![allow(unused_attribute)] // NOTE: remove after stage0 mod macros; diff --git a/src/libdebug/lib.rs b/src/libdebug/lib.rs index 850002b595e..e5424fccbed 100644 --- a/src/libdebug/lib.rs +++ b/src/libdebug/lib.rs @@ -16,7 +16,8 @@ //! Additionally, it is not guaranteed that functionality such as reflection //! will persist into the future. -#![crate_id = "debug#0.11.0"] +#![crate_id = "debug#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "debug"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -27,6 +28,7 @@ #![experimental] #![feature(managed_boxes, macro_rules)] #![allow(experimental)] +#![allow(unused_attribute)] // NOTE: remove after stage0 pub mod fmt; pub mod reflect; diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index d944818abc5..923aab5e032 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -18,7 +18,8 @@ Simple [DEFLATE][def]-based compression. This is a wrapper around the */ -#![crate_id = "flate#0.11.0"] +#![crate_id = "flate#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "flate"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -27,6 +28,7 @@ Simple [DEFLATE][def]-based compression. This is a wrapper around the html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] #![feature(phase)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[cfg(test)] #[phase(plugin, link)] extern crate log; diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index b9c0fcce52d..c32f27adf65 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -14,12 +14,14 @@ //! Parsing does not happen at runtime: structures of `std::fmt::rt` are //! generated instead. -#![crate_id = "fmt_macros#0.11.0"] +#![crate_id = "fmt_macros#0.11.0"] // NOTE: remove after stage0c +#![crate_name = "fmt_macros"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![feature(macro_rules, globs)] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::char; use std::str; diff --git a/src/libfourcc/lib.rs b/src/libfourcc/lib.rs index e854cd3069c..55e55ba7e51 100644 --- a/src/libfourcc/lib.rs +++ b/src/libfourcc/lib.rs @@ -39,7 +39,8 @@ fn main() { */ -#![crate_id = "fourcc#0.11.0"] +#![crate_id = "fourcc#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "fourcc"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -47,6 +48,7 @@ fn main() { #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(plugin_registrar, managed_boxes)] diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index 00e6df9ffbb..790df13c1ff 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -76,7 +76,8 @@ //! } //! ~~~ -#![crate_id = "getopts#0.11.0"] +#![crate_id = "getopts#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "getopts"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -87,6 +88,7 @@ html_playground_url = "http://play.rust-lang.org/")] #![feature(globs, phase)] #![deny(missing_doc)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[cfg(test)] extern crate debug; #[cfg(test)] #[phase(plugin, link)] extern crate log; diff --git a/src/libglob/lib.rs b/src/libglob/lib.rs index 3cb21601e33..6aa48dc748e 100644 --- a/src/libglob/lib.rs +++ b/src/libglob/lib.rs @@ -23,7 +23,8 @@ * `glob`/`fnmatch` functions. */ -#![crate_id = "glob#0.11.0"] +#![crate_id = "glob#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "glob"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -32,6 +33,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::cell::Cell; use std::{cmp, os, path}; diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index 16298f51ea9..52990bae554 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -266,7 +266,8 @@ pub fn main() { */ -#![crate_id = "graphviz#0.11.0"] +#![crate_id = "graphviz#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "graphviz"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -274,8 +275,7 @@ pub fn main() { #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] - -#![experimental] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::io; use std::str; diff --git a/src/libgreen/lib.rs b/src/libgreen/lib.rs index 1b34679b0a1..357644aed03 100644 --- a/src/libgreen/lib.rs +++ b/src/libgreen/lib.rs @@ -197,7 +197,8 @@ //! pool.shutdown(); //! ``` -#![crate_id = "green#0.11.0"] +#![crate_id = "green#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "green"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -208,10 +209,9 @@ html_playground_url = "http://play.rust-lang.org/")] // NB this does *not* include globs, please keep it that way. -#![feature(macro_rules, phase)] -#![allow(visible_private_types)] -#![allow(deprecated)] -#![feature(default_type_params)] +#![feature(macro_rules, phase, default_type_params)] +#![allow(visible_private_types, deprecated)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[cfg(test)] #[phase(plugin, link)] extern crate log; #[cfg(test)] extern crate rustuv; diff --git a/src/libhexfloat/lib.rs b/src/libhexfloat/lib.rs index 64538bd2212..17c71c6365e 100644 --- a/src/libhexfloat/lib.rs +++ b/src/libhexfloat/lib.rs @@ -36,7 +36,8 @@ fn main() { */ -#![crate_id = "hexfloat#0.11.0"] +#![crate_id = "hexfloat#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "hexfloat"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -45,6 +46,7 @@ fn main() { html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] #![feature(plugin_registrar, managed_boxes)] +#![allow(unused_attribute)] // NOTE: remove after stage0 extern crate syntax; extern crate rustc; diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 81e50889952..e0dd57f6ae9 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -9,7 +9,8 @@ // except according to those terms. #![feature(globs)] -#![crate_id = "libc#0.11.0"] +#![crate_id = "libc#0.11.0"] // NOTE: remove after a stage0 snap +#![crate_name = "libc"] #![experimental] #![no_std] // we don't need std, and we can't have std, since it doesn't exist // yet. std depends on us. @@ -18,6 +19,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 /*! * Bindings for the C standard library and other platform libraries diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 6216e79fe84..33d1cc87b73 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -105,7 +105,8 @@ if logging is disabled, none of the components of the log will be executed. */ -#![crate_id = "log#0.11.0"] +#![crate_id = "log#0.11.0"] // NOTE: Remove after stage0 +#![crate_name = "log"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -114,7 +115,7 @@ if logging is disabled, none of the components of the log will be executed. html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] - +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(macro_rules)] #![deny(missing_doc)] diff --git a/src/libnative/lib.rs b/src/libnative/lib.rs index 2e43ddba644..85813a7dde3 100644 --- a/src/libnative/lib.rs +++ b/src/libnative/lib.rs @@ -46,7 +46,8 @@ //! } //! ``` -#![crate_id = "native#0.11.0"] +#![crate_id = "native#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "native"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -57,6 +58,7 @@ #![deny(unused_result, unused_must_use)] #![allow(non_camel_case_types, deprecated)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(default_type_params, lang_items)] // NB this crate explicitly does *not* allow glob imports, please seriously diff --git a/src/libnum/lib.rs b/src/libnum/lib.rs index db0cd7f2567..06e69c132bd 100644 --- a/src/libnum/lib.rs +++ b/src/libnum/lib.rs @@ -44,7 +44,8 @@ #![feature(macro_rules)] -#![crate_id = "num#0.11.0"] +#![crate_id = "num#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "num"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -53,7 +54,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] - +#![allow(unused_attribute)] // NOTE: remove after stage0 #![allow(deprecated)] // from_str_radix extern crate rand; diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 593b9785d47..ac0f59225e8 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -16,7 +16,8 @@ //! is not recommended to use this library directly, but rather the official //! interface through `std::rand`. -#![crate_id = "rand#0.11.0"] +#![crate_id = "rand#0.11.0"] // NOTE: remove after a stage0 snap +#![crate_name = "rand"] #![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", @@ -25,6 +26,7 @@ html_playground_url = "http://play.rust-lang.org/")] #![feature(macro_rules, phase, globs)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![no_std] #![experimental] diff --git a/src/libregex/lib.rs b/src/libregex/lib.rs index b69c4471267..2275f9639d1 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -353,7 +353,8 @@ //! characters in the search text and `m` is the number of instructions in a //! compiled expression. -#![crate_id = "regex#0.11.0"] +#![crate_id = "regex#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "regex"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![experimental] @@ -364,6 +365,7 @@ html_playground_url = "http://play.rust-lang.org/")] #![feature(macro_rules, phase)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![deny(missing_doc)] #[cfg(test)] diff --git a/src/libregex_macros/lib.rs b/src/libregex_macros/lib.rs index e699816347c..c15b232d8e1 100644 --- a/src/libregex_macros/lib.rs +++ b/src/libregex_macros/lib.rs @@ -11,13 +11,15 @@ //! This crate provides the `regex!` macro. Its use is documented in the //! `regex` crate. -#![crate_id = "regex_macros#0.11.0"] +#![crate_id = "regex_macros#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "regex_macros"] #![crate_type = "dylib"] #![experimental] #![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(plugin_registrar, managed_boxes, quote)] diff --git a/src/librlibc/lib.rs b/src/librlibc/lib.rs index c653e1ca077..7b0fd3d6366 100644 --- a/src/librlibc/lib.rs +++ b/src/librlibc/lib.rs @@ -20,13 +20,15 @@ //! necessary. It is an error to include this library when also linking with //! the system libc library. -#![crate_id = "rlibc#0.11.0"] +#![crate_id = "rlibc#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "rlibc"] #![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] #![feature(intrinsics)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![no_std] #![experimental] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 729eb908e39..eee909f59e3 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -18,7 +18,8 @@ This API is completely unstable and subject to change. */ -#![crate_id = "rustc#0.11.0"] +#![crate_id = "rustc#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "rustc"] #![experimental] #![comment = "The Rust compiler"] #![license = "MIT/ASL2"] @@ -31,6 +32,7 @@ This API is completely unstable and subject to change. #![allow(deprecated)] #![feature(macro_rules, globs, struct_variant, managed_boxes, quote)] #![feature(default_type_params, phase, unsafe_destructor)] +#![allow(unused_attribute)] // NOTE: remove after stage0 extern crate arena; extern crate debug; diff --git a/src/librustrt/lib.rs b/src/librustrt/lib.rs index fabef24e06a..1a67f6d86ba 100644 --- a/src/librustrt/lib.rs +++ b/src/librustrt/lib.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![crate_id = "rustrt#0.11.0"] +#![crate_id = "rustrt#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "rustrt"] #![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -20,6 +21,7 @@ #![feature(linkage, lang_items, unsafe_destructor)] #![no_std] #![experimental] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[phase(plugin, link)] extern crate core; extern crate alloc; diff --git a/src/librustuv/lib.rs b/src/librustuv/lib.rs index c13263680aa..a9e6a6a4a9a 100644 --- a/src/librustuv/lib.rs +++ b/src/librustuv/lib.rs @@ -34,7 +34,8 @@ via `close` and `delete` methods. */ -#![crate_id = "rustuv#0.11.0"] +#![crate_id = "rustuv#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "rustuv"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "rlib"] @@ -47,6 +48,7 @@ via `close` and `delete` methods. #![feature(macro_rules, unsafe_destructor)] #![deny(unused_result, unused_must_use)] #![allow(visible_private_types)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[cfg(test)] extern crate green; #[cfg(test)] extern crate debug; diff --git a/src/libsemver/lib.rs b/src/libsemver/lib.rs index fc8aa8ac257..31a065a1449 100644 --- a/src/libsemver/lib.rs +++ b/src/libsemver/lib.rs @@ -28,7 +28,8 @@ //! An example version number with all five components is //! `0.8.1-rc.3.0+20130922.linux`. -#![crate_id = "semver#0.11.0"] +#![crate_id = "semver#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "semver"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -36,6 +37,7 @@ #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::char; use std::cmp; diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index a2a50413236..f635c3f4150 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -14,7 +14,8 @@ Core encoding and decoding interfaces. */ -#![crate_id = "serialize#0.11.0"] +#![crate_id = "serialize#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "serialize"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -24,6 +25,7 @@ Core encoding and decoding interfaces. html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] #![feature(macro_rules, managed_boxes, default_type_params, phase)] +#![allow(unused_attribute)] // NOTE: remove after stage0 // test harness access #[cfg(test)] diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 0e6f848fce8..928a1088d0e 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -94,7 +94,8 @@ //! all the standard macros, such as `assert!`, `fail!`, `println!`, //! and `format!`, also available to all Rust code. -#![crate_id = "std#0.11.0"] +#![crate_id = "std#0.11.0"] // NOTE: remove after stage0 snap +#![crate_name = "std"] #![unstable] #![comment = "The Rust standard library"] #![license = "MIT/ASL2"] @@ -107,6 +108,7 @@ #![feature(macro_rules, globs, managed_boxes, linkage)] #![feature(default_type_params, phase, lang_items, unsafe_destructor)] +#![allow(unused_attribute)] // NOTE: remove after stage0 // Don't link to std. We are std. #![no_std] diff --git a/src/libsync/lib.rs b/src/libsync/lib.rs index 4f6d1a261c4..c0d62caaa6b 100644 --- a/src/libsync/lib.rs +++ b/src/libsync/lib.rs @@ -17,7 +17,8 @@ //! use this crate specifically. Instead, its functionality is reexported //! through `std::sync`. -#![crate_id = "sync#0.11.0"] +#![crate_id = "sync#0.11.0"] // NOTE: remove after stage0 snap +#![crate_name = "sync"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -30,6 +31,7 @@ #![feature(phase, globs, macro_rules, unsafe_destructor)] #![deny(missing_doc)] #![no_std] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[phase(plugin, link)] extern crate core; extern crate alloc; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index ce63d2bb731..6df91c66a25 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -18,7 +18,8 @@ This API is completely unstable and subject to change. */ -#![crate_id = "syntax#0.11.0"] +#![crate_id = "syntax#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "syntax"] #![experimental] #![license = "MIT/ASL2"] #![crate_type = "dylib"] @@ -30,6 +31,7 @@ This API is completely unstable and subject to change. #![feature(macro_rules, globs, managed_boxes, default_type_params, phase)] #![feature(quote, unsafe_destructor)] #![allow(deprecated)] +#![allow(unused_attribute)] // NOTE: remove after stage0 extern crate serialize; extern crate term; diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 56694e28b66..cdd067cef5b 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -38,7 +38,8 @@ //! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx //! [ti]: https://en.wikipedia.org/wiki/Terminfo -#![crate_id = "term#0.11.0"] +#![crate_id = "term#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "term"] #![experimental] #![comment = "Simple ANSI color library"] #![license = "MIT/ASL2"] @@ -48,6 +49,7 @@ html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(macro_rules, phase)] diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 02f7ebc6d21..1eb13fd660e 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -23,7 +23,8 @@ // running tests while providing a base that other test frameworks may // build off of. -#![crate_id = "test#0.11.0"] +#![crate_id = "test#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "test"] // NOTE: remove after stage0 #![experimental] #![comment = "Rust internal test library only used by rustc"] #![license = "MIT/ASL2"] @@ -32,6 +33,7 @@ #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(asm, macro_rules, phase)] diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs index 0e4de41959a..873cc7af7b6 100644 --- a/src/libtime/lib.rs +++ b/src/libtime/lib.rs @@ -10,7 +10,8 @@ //! Simple time handling. -#![crate_id = "time#0.11.0"] +#![crate_id = "time#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "time"] #![experimental] #![crate_type = "rlib"] @@ -21,6 +22,7 @@ html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] #![feature(phase)] +#![allow(unused_attribute)] // NOTE: remove after stage0 #[cfg(test)] extern crate debug; #[cfg(test)] #[phase(plugin, link)] extern crate log; diff --git a/src/liburl/lib.rs b/src/liburl/lib.rs index a60cc8e992b..e3cf6f13766 100644 --- a/src/liburl/lib.rs +++ b/src/liburl/lib.rs @@ -10,7 +10,8 @@ //! Types/fns concerning URLs (see RFC 3986) -#![crate_id = "url#0.11.0"] +#![crate_id = "url#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "url"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -20,6 +21,7 @@ html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] #![feature(default_type_params)] +#![allow(unused_attribute)] // NOTE: remove after stage0 use std::collections::HashMap; use std::fmt; diff --git a/src/libuuid/lib.rs b/src/libuuid/lib.rs index 297afe4aa59..426b350cab9 100644 --- a/src/libuuid/lib.rs +++ b/src/libuuid/lib.rs @@ -54,7 +54,8 @@ Examples of string representations: */ -#![crate_id = "uuid#0.11.0"] +#![crate_id = "uuid#0.11.0"] // NOTE: remove after stage0 +#![crate_name = "uuid"] #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] @@ -63,6 +64,7 @@ Examples of string representations: html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/0.11.0/", html_playground_url = "http://play.rust-lang.org/")] +#![allow(unused_attribute)] // NOTE: remove after stage0 #![feature(default_type_params)] -- cgit 1.4.1-3-g733a5