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]
This commit is contained in:
@@ -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<MetaItem>]) -> Vec<Gc<MetaItem>> {
|
||||
}).collect()
|
||||
}
|
||||
|
||||
pub fn find_crateid(attrs: &[Attribute]) -> Option<CrateId> {
|
||||
match first_attr_value_str_by_name(attrs, "crate_id") {
|
||||
None => None,
|
||||
Some(id) => from_str::<CrateId>(id.get()),
|
||||
}
|
||||
pub fn find_crate_name(attrs: &[Attribute]) -> Option<InternedString> {
|
||||
first_attr_value_str_by_name(attrs, "crate_name")
|
||||
}
|
||||
|
||||
#[deriving(PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user