diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-06 13:21:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-07-05 12:38:42 -0700 |
| commit | 50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac (patch) | |
| tree | 6e812d9727a61ccea67f3bc922557d6d45736fbd /src/libsyntax/ext/expand.rs | |
| parent | aaff4e05e19b48d81e4ecb3337f288f42d06edd0 (diff) | |
| download | rust-50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac.tar.gz rust-50ee1ec1b4f107122d8037ac7b0b312afa6eb0ac.zip | |
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]
Diffstat (limited to 'src/libsyntax/ext/expand.rs')
| -rw-r--r-- | src/libsyntax/ext/expand.rs | 11 |
1 files changed, 5 insertions, 6 deletions
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) } |
