about summary refs log tree commit diff
path: root/src/librustc/metadata
diff options
context:
space:
mode:
authorMarvin Löbel <loebel.marvin@gmail.com>2013-09-02 02:50:59 +0200
committerMarvin Löbel <loebel.marvin@gmail.com>2013-09-02 02:51:21 +0200
commit857f8673206fd2d8803e02c68cdeb38e26b95df0 (patch)
tree7cfb11be2843774595371087f2829d0e2e830fe2 /src/librustc/metadata
parent1f4aba8cbf7caa3a82b52b6f171221ed6067eed5 (diff)
downloadrust-857f8673206fd2d8803e02c68cdeb38e26b95df0.tar.gz
rust-857f8673206fd2d8803e02c68cdeb38e26b95df0.zip
Renamed syntax::ast::ident -> Ident
Diffstat (limited to 'src/librustc/metadata')
-rw-r--r--src/librustc/metadata/csearch.rs12
-rw-r--r--src/librustc/metadata/decoder.rs18
-rw-r--r--src/librustc/metadata/encoder.rs14
-rw-r--r--src/librustc/metadata/tydecode.rs6
4 files changed, 25 insertions, 25 deletions
diff --git a/src/librustc/metadata/csearch.rs b/src/librustc/metadata/csearch.rs
index 198c41539cb..a1a07d8bf3f 100644
--- a/src/librustc/metadata/csearch.rs
+++ b/src/librustc/metadata/csearch.rs
@@ -25,7 +25,7 @@ use syntax::ast_map;
 use syntax::diagnostic::expect;
 
 pub struct StaticMethodInfo {
-    ident: ast::ident,
+    ident: ast::Ident,
     def_id: ast::def_id,
     purity: ast::purity
 }
@@ -52,7 +52,7 @@ pub fn each_lang_item(cstore: @mut cstore::CStore,
 /// Iterates over each child of the given item.
 pub fn each_child_of_item(cstore: @mut cstore::CStore,
                           def_id: ast::def_id,
-                          callback: &fn(decoder::DefLike, ast::ident)) {
+                          callback: &fn(decoder::DefLike, ast::Ident)) {
     let crate_data = cstore::get_crate_data(cstore, def_id.crate);
     let get_crate_data: decoder::GetCrateDataCb = |cnum| {
         cstore::get_crate_data(cstore, cnum)
@@ -68,7 +68,7 @@ pub fn each_child_of_item(cstore: @mut cstore::CStore,
 pub fn each_top_level_item_of_crate(cstore: @mut cstore::CStore,
                                     cnum: ast::CrateNum,
                                     callback: &fn(decoder::DefLike,
-                                                  ast::ident)) {
+                                                  ast::Ident)) {
     let crate_data = cstore::get_crate_data(cstore, cnum);
     let get_crate_data: decoder::GetCrateDataCb = |cnum| {
         cstore::get_crate_data(cstore, cnum)
@@ -129,7 +129,7 @@ pub fn get_method(tcx: ty::ctxt, def: ast::def_id) -> ty::Method {
 
 pub fn get_method_name_and_explicit_self(cstore: @mut cstore::CStore,
                                          def: ast::def_id)
-                                     -> (ast::ident, ast::explicit_self_)
+                                     -> (ast::Ident, ast::explicit_self_)
 {
     let cdata = cstore::get_crate_data(cstore, def.crate);
     decoder::get_method_name_and_explicit_self(cstore.intr, cdata, def.node)
@@ -156,7 +156,7 @@ pub fn get_supertraits(tcx: ty::ctxt, def: ast::def_id) -> ~[@ty::TraitRef] {
 }
 
 pub fn get_type_name_if_impl(cstore: @mut cstore::CStore, def: ast::def_id)
-                          -> Option<ast::ident> {
+                          -> Option<ast::Ident> {
     let cdata = cstore::get_crate_data(cstore, def.crate);
     decoder::get_type_name_if_impl(cdata, def.node)
 }
@@ -245,7 +245,7 @@ pub fn get_impl_vtables(tcx: ty::ctxt,
 
 pub fn get_impl_method(cstore: @mut cstore::CStore,
                        def: ast::def_id,
-                       mname: ast::ident)
+                       mname: ast::Ident)
                     -> Option<ast::def_id> {
     let cdata = cstore::get_crate_data(cstore, def.crate);
     decoder::get_impl_method(cstore.intr, cdata, def.node, mname)
diff --git a/src/librustc/metadata/decoder.rs b/src/librustc/metadata/decoder.rs
index 592ee1b0a63..0200ca49bad 100644
--- a/src/librustc/metadata/decoder.rs
+++ b/src/librustc/metadata/decoder.rs
@@ -312,12 +312,12 @@ fn item_path(item_doc: ebml::Doc) -> ast_map::path {
     return result;
 }
 
-fn item_name(intr: @ident_interner, item: ebml::Doc) -> ast::ident {
+fn item_name(intr: @ident_interner, item: ebml::Doc) -> ast::Ident {
     let name = reader::get_doc(item, tag_paths_data_name);
     let string = name.as_str_slice();
     match intr.find_equiv(&string) {
         None => token::str_to_ident(string),
-        Some(val) => ast::new_ident(val),
+        Some(val) => ast::Ident::new(val),
     }
 }
 
@@ -452,7 +452,7 @@ pub fn get_impl_vtables(cdata: Cmd,
 
 
 pub fn get_impl_method(intr: @ident_interner, cdata: Cmd, id: ast::NodeId,
-                       name: ast::ident) -> Option<ast::def_id> {
+                       name: ast::Ident) -> Option<ast::def_id> {
     let items = reader::get_doc(reader::Doc(cdata.data), tag_items);
     let mut found = None;
     do reader::tagged_docs(find_item(id, items), tag_item_impl_method) |mid| {
@@ -706,7 +706,7 @@ fn each_child_of_item_or_crate(intr: @ident_interner,
                                cdata: Cmd,
                                item_doc: ebml::Doc,
                                get_crate_data: GetCrateDataCb,
-                               callback: &fn(DefLike, ast::ident)) {
+                               callback: &fn(DefLike, ast::Ident)) {
     // Iterate over all children.
     let _ = do reader::tagged_docs(item_doc, tag_mod_child) |child_info_doc| {
         let child_def_id = reader::with_doc_data(child_info_doc,
@@ -829,7 +829,7 @@ pub fn each_child_of_item(intr: @ident_interner,
                           cdata: Cmd,
                           id: ast::NodeId,
                           get_crate_data: GetCrateDataCb,
-                          callback: &fn(DefLike, ast::ident)) {
+                          callback: &fn(DefLike, ast::Ident)) {
     // Find the item.
     let root_doc = reader::Doc(cdata.data);
     let items = reader::get_doc(root_doc, tag_items);
@@ -849,7 +849,7 @@ pub fn each_child_of_item(intr: @ident_interner,
 pub fn each_top_level_item_of_crate(intr: @ident_interner,
                                     cdata: Cmd,
                                     get_crate_data: GetCrateDataCb,
-                                    callback: &fn(DefLike, ast::ident)) {
+                                    callback: &fn(DefLike, ast::Ident)) {
     let root_doc = reader::Doc(cdata.data);
     let misc_info_doc = reader::get_doc(root_doc, tag_misc_info);
     let crate_items_doc = reader::get_doc(misc_info_doc,
@@ -995,7 +995,7 @@ pub fn get_impl(intr: @ident_interner, cdata: Cmd, impl_id: ast::NodeId,
 pub fn get_method_name_and_explicit_self(
     intr: @ident_interner,
     cdata: Cmd,
-    id: ast::NodeId) -> (ast::ident, ast::explicit_self_)
+    id: ast::NodeId) -> (ast::Ident, ast::explicit_self_)
 {
     let method_doc = lookup_item(id, cdata.data);
     let name = item_name(intr, method_doc);
@@ -1093,7 +1093,7 @@ pub fn get_supertraits(cdata: Cmd, id: ast::NodeId, tcx: ty::ctxt)
 }
 
 pub fn get_type_name_if_impl(cdata: Cmd,
-                             node_id: ast::NodeId) -> Option<ast::ident> {
+                             node_id: ast::NodeId) -> Option<ast::Ident> {
     let item = lookup_item(node_id, cdata.data);
     if item_family(item) != Impl {
         return None;
@@ -1352,7 +1352,7 @@ pub fn get_crate_attributes(data: @~[u8]) -> ~[ast::Attribute] {
 #[deriving(Clone)]
 pub struct CrateDep {
     cnum: ast::CrateNum,
-    name: ast::ident,
+    name: ast::Ident,
     vers: @str,
     hash: @str
 }
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs
index c6efeaec9b3..d2ad7889649 100644
--- a/src/librustc/metadata/encoder.rs
+++ b/src/librustc/metadata/encoder.rs
@@ -102,13 +102,13 @@ pub fn reachable(ecx: &EncodeContext, id: NodeId) -> bool {
 
 fn encode_name(ecx: &EncodeContext,
                ebml_w: &mut writer::Encoder,
-               name: ident) {
+               name: Ident) {
     ebml_w.wr_tagged_str(tag_paths_data_name, ecx.tcx.sess.str_of(name));
 }
 
 fn encode_impl_type_basename(ecx: &EncodeContext,
                              ebml_w: &mut writer::Encoder,
-                             name: ident) {
+                             name: Ident) {
     ebml_w.wr_tagged_str(tag_item_impl_type_basename,
                          ecx.tcx.sess.str_of(name));
 }
@@ -135,9 +135,9 @@ struct entry<T> {
 }
 
 fn add_to_index(ebml_w: &mut writer::Encoder,
-                path: &[ident],
+                path: &[Ident],
                 index: &mut ~[entry<~str>],
-                name: ident) {
+                name: Ident) {
     let mut full_path = ~[];
     full_path.push_all(path);
     full_path.push(name);
@@ -379,7 +379,7 @@ fn encode_reexported_static_method(ecx: &EncodeContext,
                                    ebml_w: &mut writer::Encoder,
                                    exp: &middle::resolve::Export2,
                                    method_def_id: def_id,
-                                   method_ident: ident) {
+                                   method_ident: Ident) {
     debug!("(encode reexported static method) %s::%s",
             exp.name, ecx.tcx.sess.str_of(method_ident));
     ebml_w.start_tag(tag_items_data_item_reexport);
@@ -541,7 +541,7 @@ fn encode_info_for_mod(ecx: &EncodeContext,
                        md: &_mod,
                        id: NodeId,
                        path: &[ast_map::path_elt],
-                       name: ident,
+                       name: Ident,
                        vis: visibility) {
     ebml_w.start_tag(tag_items_data_item);
     encode_def_id(ebml_w, local_def(id));
@@ -700,7 +700,7 @@ fn encode_info_for_struct(ecx: &EncodeContext,
 fn encode_info_for_struct_ctor(ecx: &EncodeContext,
                                ebml_w: &mut writer::Encoder,
                                path: &[ast_map::path_elt],
-                               name: ast::ident,
+                               name: ast::Ident,
                                ctor_id: NodeId,
                                index: @mut ~[entry<i64>]) {
     index.push(entry { val: ctor_id as i64, pos: ebml_w.writer.tell() });
diff --git a/src/librustc/metadata/tydecode.rs b/src/librustc/metadata/tydecode.rs
index f5bad88b1ca..3e520522ba5 100644
--- a/src/librustc/metadata/tydecode.rs
+++ b/src/librustc/metadata/tydecode.rs
@@ -90,13 +90,13 @@ fn scan<R>(st: &mut PState, is_last: &fn(char) -> bool,
     return op(st.data.slice(start_pos, end_pos));
 }
 
-pub fn parse_ident(st: &mut PState, last: char) -> ast::ident {
+pub fn parse_ident(st: &mut PState, last: char) -> ast::Ident {
     fn is_last(b: char, c: char) -> bool { return c == b; }
     return parse_ident_(st, |a| is_last(last, a) );
 }
 
 fn parse_ident_(st: &mut PState, is_last: @fn(char) -> bool) ->
-   ast::ident {
+   ast::Ident {
     let rslt = scan(st, is_last, str::from_bytes);
     return st.tcx.sess.ident_of(rslt);
 }
@@ -130,7 +130,7 @@ pub fn parse_trait_ref_data(data: &[u8], crate_num: int, pos: uint, tcx: ty::ctx
 }
 
 fn parse_path(st: &mut PState) -> @ast::Path {
-    let mut idents: ~[ast::ident] = ~[];
+    let mut idents: ~[ast::Ident] = ~[];
     fn is_last(c: char) -> bool { return c == '(' || c == ':'; }
     idents.push(parse_ident_(st, is_last));
     loop {