about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2014-01-09 22:25:09 +0200
committerEduard Burtescu <edy.burt@gmail.com>2014-01-09 22:25:28 +0200
commit72ee4a57b7ab3651db1ec99ff3167b86f2583c43 (patch)
treedf2ace956c0631a5c6f3edb2e9f020330f863a89
parent6b221768cfe4585a70cc5c3b647ceda0c7319c25 (diff)
Updated librustdoc and librustpkg to use the proper UpperCase names from libsyntax.
-rw-r--r--src/librustdoc/clean.rs35
-rw-r--r--src/librustdoc/doctree.rs2
-rw-r--r--src/librustdoc/visit_ast.rs24
-rw-r--r--src/librustpkg/lib.rs2
4 files changed, 31 insertions, 32 deletions
diff --git a/src/librustdoc/clean.rs b/src/librustdoc/clean.rs
index 3de2c67032e..bc70dcb935a 100644
--- a/src/librustdoc/clean.rs
+++ b/src/librustdoc/clean.rs
@@ -598,9 +598,9 @@ pub enum Type {
     FixedVector(~Type, ~str),
     String,
     Bool,
-    /// aka ty_nil
+    /// aka TyNil
     Unit,
-    /// aka ty_bot
+    /// aka TyBot
     Bottom,
     Unique(~Type),
     Managed(~Type),
@@ -624,22 +624,22 @@ impl Clean<Type> for ast::Ty {
         let codemap = local_data::get(super::ctxtkey, |x| *x.unwrap()).sess.codemap;
         debug!("span corresponds to `{}`", codemap.span_to_str(self.span));
         match self.node {
-            ty_nil => Unit,
-            ty_ptr(ref m) => RawPointer(m.mutbl.clean(), ~m.ty.clean()),
-            ty_rptr(ref l, ref m) =>
+            TyNil => Unit,
+            TyPtr(ref m) => RawPointer(m.mutbl.clean(), ~m.ty.clean()),
+            TyRptr(ref l, ref m) =>
                 BorrowedRef {lifetime: l.clean(), mutability: m.mutbl.clean(),
                              type_: ~m.ty.clean()},
-            ty_box(ty) => Managed(~ty.clean()),
-            ty_uniq(ty) => Unique(~ty.clean()),
-            ty_vec(ty) => Vector(~ty.clean()),
-            ty_fixed_length_vec(ty, ref e) => FixedVector(~ty.clean(),
-                                                          e.span.to_src()),
-            ty_tup(ref tys) => Tuple(tys.iter().map(|x| x.clean()).collect()),
-            ty_path(ref p, ref tpbs, id) =>
+            TyBox(ty) => Managed(~ty.clean()),
+            TyUniq(ty) => Unique(~ty.clean()),
+            TyVec(ty) => Vector(~ty.clean()),
+            TyFixedLengthVec(ty, ref e) => FixedVector(~ty.clean(),
+                                                       e.span.to_src()),
+            TyTup(ref tys) => Tuple(tys.iter().map(|x| x.clean()).collect()),
+            TyPath(ref p, ref tpbs, id) =>
                 resolve_type(p.clean(), tpbs.clean(), id),
-            ty_closure(ref c) => Closure(~c.clean()),
-            ty_bare_fn(ref barefn) => BareFunction(~barefn.clean()),
-            ty_bot => Bottom,
+            TyClosure(ref c) => Closure(~c.clean()),
+            TyBareFn(ref barefn) => BareFunction(~barefn.clean()),
+            TyBot => Bottom,
             ref x => fail!("Unimplemented type {:?}", x),
         }
     }
@@ -1204,9 +1204,8 @@ fn resolve_type(path: Path, tpbs: Option<~[TyParamBound]>,
         let fqn = csearch::get_item_path(tycx, def_id);
         let fqn = fqn.move_iter().map(|i| {
             match i {
-                ast_map::path_mod(id) |
-                ast_map::path_name(id) |
-                ast_map::path_pretty_name(id, _) => id.clean()
+                ast_map::PathMod(id) | ast_map::PathName(id) |
+                ast_map::PathPrettyName(id, _) => id.clean()
             }
         }).to_owned_vec();
         ExternalPath{ path: path, typarams: tpbs, fqn: fqn, kind: kind,
diff --git a/src/librustdoc/doctree.rs b/src/librustdoc/doctree.rs
index 38252658a48..f1bd3a62e01 100644
--- a/src/librustdoc/doctree.rs
+++ b/src/librustdoc/doctree.rs
@@ -39,7 +39,7 @@ impl Module {
         Module {
             name       : name,
             id: 0,
-            vis: ast::private,
+            vis: ast::Private,
             where: syntax::codemap::DUMMY_SP,
             attrs      : ~[],
             structs    : ~[],
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index c96502c55b3..ce29584f5b9 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -121,36 +121,36 @@ impl<'a> RustdocVisitor<'a> {
         om
     }
 
-    pub fn visit_view_item(&mut self, item: &ast::view_item, om: &mut Module) {
-        if item.vis != ast::public {
+    pub fn visit_view_item(&mut self, item: &ast::ViewItem, om: &mut Module) {
+        if item.vis != ast::Public {
             return om.view_items.push(item.clone());
         }
         let item = match item.node {
-            ast::view_item_use(ref paths) => {
+            ast::ViewItemUse(ref paths) => {
                 // rustc no longer supports "use foo, bar;"
                 assert_eq!(paths.len(), 1);
                 match self.visit_view_path(paths[0], om) {
                     None => return,
                     Some(path) => {
-                        ast::view_item {
-                            node: ast::view_item_use(~[path]),
+                        ast::ViewItem {
+                            node: ast::ViewItemUse(~[path]),
                             .. item.clone()
                         }
                     }
                 }
             }
-            ast::view_item_extern_mod(..) => item.clone()
+            ast::ViewItemExternMod(..) => item.clone()
         };
         om.view_items.push(item);
     }
 
-    fn visit_view_path(&mut self, path: @ast::view_path,
-                       om: &mut Module) -> Option<@ast::view_path> {
+    fn visit_view_path(&mut self, path: @ast::ViewPath,
+                       om: &mut Module) -> Option<@ast::ViewPath> {
         match path.node {
-            ast::view_path_simple(_, _, id) => {
+            ast::ViewPathSimple(_, _, id) => {
                 if self.resolve_id(id, false, om) { return None }
             }
-            ast::view_path_list(ref p, ref paths, ref b) => {
+            ast::ViewPathList(ref p, ref paths, ref b) => {
                 let mut mine = ~[];
                 for path in paths.iter() {
                     if !self.resolve_id(path.node.id, false, om) {
@@ -160,13 +160,13 @@ impl<'a> RustdocVisitor<'a> {
 
                 if mine.len() == 0 { return None }
                 return Some(@::syntax::codemap::Spanned {
-                    node: ast::view_path_list(p.clone(), mine, b.clone()),
+                    node: ast::ViewPathList(p.clone(), mine, b.clone()),
                     span: path.span,
                 })
             }
 
             // these are feature gated anyway
-            ast::view_path_glob(_, id) => {
+            ast::ViewPathGlob(_, id) => {
                 if self.resolve_id(id, true, om) { return None }
             }
         }
diff --git a/src/librustpkg/lib.rs b/src/librustpkg/lib.rs
index 99cf14f0d96..135b659871d 100644
--- a/src/librustpkg/lib.rs
+++ b/src/librustpkg/lib.rs
@@ -88,7 +88,7 @@ struct PkgScript<'a> {
     /// The config for compiling the custom build script
     cfg: ast::CrateConfig,
     /// The crate and ast_map for the custom build script
-    crate_and_map: Option<(ast::Crate, syntax::ast_map::map)>,
+    crate_and_map: Option<(ast::Crate, syntax::ast_map::Map)>,
     /// Directory in which to store build output
     build_dir: Path
 }