summary refs log tree commit diff
path: root/src/libsyntax/ext
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/libsyntax/ext
parent1f4aba8cbf7caa3a82b52b6f171221ed6067eed5 (diff)
downloadrust-857f8673206fd2d8803e02c68cdeb38e26b95df0.tar.gz
rust-857f8673206fd2d8803e02c68cdeb38e26b95df0.zip
Renamed syntax::ast::ident -> Ident
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/base.rs14
-rw-r--r--src/libsyntax/ext/build.rs162
-rw-r--r--src/libsyntax/ext/deriving/generic.rs56
-rw-r--r--src/libsyntax/ext/deriving/mod.rs6
-rw-r--r--src/libsyntax/ext/deriving/rand.rs6
-rw-r--r--src/libsyntax/ext/deriving/to_str.rs4
-rw-r--r--src/libsyntax/ext/deriving/ty.rs14
-rw-r--r--src/libsyntax/ext/expand.rs38
-rw-r--r--src/libsyntax/ext/fmt.rs2
-rw-r--r--src/libsyntax/ext/ifmt.rs2
-rw-r--r--src/libsyntax/ext/quote.rs10
-rw-r--r--src/libsyntax/ext/tt/macro_parser.rs10
-rw-r--r--src/libsyntax/ext/tt/macro_rules.rs6
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs10
14 files changed, 170 insertions, 170 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 83a19bb4634..913b68da0cb 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -57,7 +57,7 @@ pub struct SyntaxExpanderTTItem {
 
 pub type SyntaxExpanderTTItemFun = @fn(@ExtCtxt,
                                        Span,
-                                       ast::ident,
+                                       ast::Ident,
                                        ~[ast::token_tree])
                                     -> MacResult;
 
@@ -114,7 +114,7 @@ pub struct BlockInfo {
 }
 
 // a list of ident->name renamings
-type RenameList = ~[(ast::ident,Name)];
+type RenameList = ~[(ast::Ident,Name)];
 
 // The base map of methods for expanding syntax extension
 // AST nodes into full ASTs
@@ -228,7 +228,7 @@ pub struct ExtCtxt {
     // and there are bugs in the code for object
     // types that make this hard to get right at the
     // moment. - nmatsakis
-    mod_path: @mut ~[ast::ident],
+    mod_path: @mut ~[ast::Ident],
     trace_mac: @mut bool
 }
 
@@ -255,9 +255,9 @@ impl ExtCtxt {
     }
     pub fn print_backtrace(&self) { }
     pub fn backtrace(&self) -> Option<@ExpnInfo> { *self.backtrace }
-    pub fn mod_push(&self, i: ast::ident) { self.mod_path.push(i); }
+    pub fn mod_push(&self, i: ast::Ident) { self.mod_path.push(i); }
     pub fn mod_pop(&self) { self.mod_path.pop(); }
-    pub fn mod_path(&self) -> ~[ast::ident] { (*self.mod_path).clone() }
+    pub fn mod_path(&self) -> ~[ast::Ident] { (*self.mod_path).clone() }
     pub fn bt_push(&self, ei: codemap::ExpnInfo) {
         match ei {
             ExpnInfo {call_site: cs, callee: ref callee} => {
@@ -311,10 +311,10 @@ impl ExtCtxt {
     pub fn set_trace_macros(&self, x: bool) {
         *self.trace_mac = x
     }
-    pub fn str_of(&self, id: ast::ident) -> @str {
+    pub fn str_of(&self, id: ast::Ident) -> @str {
         ident_to_str(&id)
     }
-    pub fn ident_of(&self, st: &str) -> ast::ident {
+    pub fn ident_of(&self, st: &str) -> ast::Ident {
         str_to_ident(st)
     }
 }
diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs
index 194b4ab83f9..55f7a35e1df 100644
--- a/src/libsyntax/ext/build.rs
+++ b/src/libsyntax/ext/build.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use abi::AbiSet;
-use ast::ident;
+use ast::Ident;
 use ast;
 use ast_util;
 use codemap::{Span, respan, dummy_sp};
@@ -20,7 +20,7 @@ use opt_vec;
 use opt_vec::OptVec;
 
 pub struct Field {
-    ident: ast::ident,
+    ident: ast::Ident,
     ex: @ast::expr
 }
 
@@ -32,12 +32,12 @@ mod syntax {
 
 pub trait AstBuilder {
     // paths
-    fn path(&self, span: Span, strs: ~[ast::ident]) -> ast::Path;
-    fn path_ident(&self, span: Span, id: ast::ident) -> ast::Path;
-    fn path_global(&self, span: Span, strs: ~[ast::ident]) -> ast::Path;
+    fn path(&self, span: Span, strs: ~[ast::Ident]) -> ast::Path;
+    fn path_ident(&self, span: Span, id: ast::Ident) -> ast::Path;
+    fn path_global(&self, span: Span, strs: ~[ast::Ident]) -> ast::Path;
     fn path_all(&self, sp: Span,
                 global: bool,
-                idents: ~[ast::ident],
+                idents: ~[ast::Ident],
                 rp: Option<ast::Lifetime>,
                 types: ~[ast::Ty])
         -> ast::Path;
@@ -47,7 +47,7 @@ pub trait AstBuilder {
 
     fn ty(&self, span: Span, ty: ast::ty_) -> ast::Ty;
     fn ty_path(&self, ast::Path, Option<OptVec<ast::TyParamBound>>) -> ast::Ty;
-    fn ty_ident(&self, span: Span, idents: ast::ident) -> ast::Ty;
+    fn ty_ident(&self, span: Span, idents: ast::Ident) -> ast::Ty;
 
     fn ty_rptr(&self, span: Span,
                ty: ast::Ty,
@@ -62,22 +62,22 @@ pub trait AstBuilder {
 
     fn ty_vars(&self, ty_params: &OptVec<ast::TyParam>) -> ~[ast::Ty];
     fn ty_vars_global(&self, ty_params: &OptVec<ast::TyParam>) -> ~[ast::Ty];
-    fn ty_field_imm(&self, span: Span, name: ident, ty: ast::Ty) -> ast::TypeField;
+    fn ty_field_imm(&self, span: Span, name: Ident, ty: ast::Ty) -> ast::TypeField;
     fn strip_bounds(&self, bounds: &Generics) -> Generics;
 
-    fn typaram(&self, id: ast::ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam;
+    fn typaram(&self, id: ast::Ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam;
 
     fn trait_ref(&self, path: ast::Path) -> ast::trait_ref;
     fn typarambound(&self, path: ast::Path) -> ast::TyParamBound;
-    fn lifetime(&self, span: Span, ident: ast::ident) -> ast::Lifetime;
+    fn lifetime(&self, span: Span, ident: ast::Ident) -> ast::Lifetime;
 
     // statements
     fn stmt_expr(&self, expr: @ast::expr) -> @ast::stmt;
-    fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::ident, ex: @ast::expr) -> @ast::stmt;
+    fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::Ident, ex: @ast::expr) -> @ast::stmt;
     fn stmt_let_typed(&self,
                       sp: Span,
                       mutbl: bool,
-                      ident: ast::ident,
+                      ident: ast::Ident,
                       typ: ast::Ty,
                       ex: @ast::expr)
                       -> @ast::stmt;
@@ -93,7 +93,7 @@ pub trait AstBuilder {
     // expressions
     fn expr(&self, span: Span, node: ast::expr_) -> @ast::expr;
     fn expr_path(&self, path: ast::Path) -> @ast::expr;
-    fn expr_ident(&self, span: Span, id: ast::ident) -> @ast::expr;
+    fn expr_ident(&self, span: Span, id: ast::Ident) -> @ast::expr;
 
     fn expr_self(&self, span: Span) -> @ast::expr;
     fn expr_binary(&self, sp: Span, op: ast::binop,
@@ -104,19 +104,19 @@ pub trait AstBuilder {
     fn expr_managed(&self, sp: Span, e: @ast::expr) -> @ast::expr;
     fn expr_addr_of(&self, sp: Span, e: @ast::expr) -> @ast::expr;
     fn expr_mut_addr_of(&self, sp: Span, e: @ast::expr) -> @ast::expr;
-    fn expr_field_access(&self, span: Span, expr: @ast::expr, ident: ast::ident) -> @ast::expr;
+    fn expr_field_access(&self, span: Span, expr: @ast::expr, ident: ast::Ident) -> @ast::expr;
     fn expr_call(&self, span: Span, expr: @ast::expr, args: ~[@ast::expr]) -> @ast::expr;
-    fn expr_call_ident(&self, span: Span, id: ast::ident, args: ~[@ast::expr]) -> @ast::expr;
-    fn expr_call_global(&self, sp: Span, fn_path: ~[ast::ident],
+    fn expr_call_ident(&self, span: Span, id: ast::Ident, args: ~[@ast::expr]) -> @ast::expr;
+    fn expr_call_global(&self, sp: Span, fn_path: ~[ast::Ident],
                         args: ~[@ast::expr]) -> @ast::expr;
     fn expr_method_call(&self, span: Span,
-                        expr: @ast::expr, ident: ast::ident,
+                        expr: @ast::expr, ident: ast::Ident,
                         args: ~[@ast::expr]) -> @ast::expr;
     fn expr_block(&self, b: ast::Block) -> @ast::expr;
 
-    fn field_imm(&self, span: Span, name: ident, e: @ast::expr) -> ast::Field;
+    fn field_imm(&self, span: Span, name: Ident, e: @ast::expr) -> ast::Field;
     fn expr_struct(&self, span: Span, path: ast::Path, fields: ~[ast::Field]) -> @ast::expr;
-    fn expr_struct_ident(&self, span: Span, id: ast::ident, fields: ~[ast::Field]) -> @ast::expr;
+    fn expr_struct_ident(&self, span: Span, id: ast::Ident, fields: ~[ast::Field]) -> @ast::expr;
 
     fn expr_lit(&self, sp: Span, lit: ast::lit_) -> @ast::expr;
 
@@ -137,11 +137,11 @@ pub trait AstBuilder {
     fn pat(&self, span: Span, pat: ast::pat_) -> @ast::pat;
     fn pat_wild(&self, span: Span) -> @ast::pat;
     fn pat_lit(&self, span: Span, expr: @ast::expr) -> @ast::pat;
-    fn pat_ident(&self, span: Span, ident: ast::ident) -> @ast::pat;
+    fn pat_ident(&self, span: Span, ident: ast::Ident) -> @ast::pat;
 
     fn pat_ident_binding_mode(&self,
                               span: Span,
-                              ident: ast::ident,
+                              ident: ast::Ident,
                               bm: ast::binding_mode) -> @ast::pat;
     fn pat_enum(&self, span: Span, path: ast::Path, subpats: ~[@ast::pat]) -> @ast::pat;
     fn pat_struct(&self, span: Span,
@@ -156,65 +156,65 @@ pub trait AstBuilder {
 
     fn lambda_fn_decl(&self, span: Span, fn_decl: ast::fn_decl, blk: ast::Block) -> @ast::expr;
 
-    fn lambda(&self, span: Span, ids: ~[ast::ident], blk: ast::Block) -> @ast::expr;
+    fn lambda(&self, span: Span, ids: ~[ast::Ident], blk: ast::Block) -> @ast::expr;
     fn lambda0(&self, span: Span, blk: ast::Block) -> @ast::expr;
-    fn lambda1(&self, span: Span, blk: ast::Block, ident: ast::ident) -> @ast::expr;
+    fn lambda1(&self, span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::expr;
 
-    fn lambda_expr(&self, span: Span, ids: ~[ast::ident], blk: @ast::expr) -> @ast::expr;
+    fn lambda_expr(&self, span: Span, ids: ~[ast::Ident], blk: @ast::expr) -> @ast::expr;
     fn lambda_expr_0(&self, span: Span, expr: @ast::expr) -> @ast::expr;
-    fn lambda_expr_1(&self, span: Span, expr: @ast::expr, ident: ast::ident) -> @ast::expr;
+    fn lambda_expr_1(&self, span: Span, expr: @ast::expr, ident: ast::Ident) -> @ast::expr;
 
-    fn lambda_stmts(&self, span: Span, ids: ~[ast::ident], blk: ~[@ast::stmt]) -> @ast::expr;
+    fn lambda_stmts(&self, span: Span, ids: ~[ast::Ident], blk: ~[@ast::stmt]) -> @ast::expr;
     fn lambda_stmts_0(&self, span: Span, stmts: ~[@ast::stmt]) -> @ast::expr;
-    fn lambda_stmts_1(&self, span: Span, stmts: ~[@ast::stmt], ident: ast::ident) -> @ast::expr;
+    fn lambda_stmts_1(&self, span: Span, stmts: ~[@ast::stmt], ident: ast::Ident) -> @ast::expr;
 
     // items
     fn item(&self, span: Span,
-            name: ident, attrs: ~[ast::Attribute], node: ast::item_) -> @ast::item;
+            name: Ident, attrs: ~[ast::Attribute], node: ast::item_) -> @ast::item;
 
-    fn arg(&self, span: Span, name: ident, ty: ast::Ty) -> ast::arg;
+    fn arg(&self, span: Span, name: Ident, ty: ast::Ty) -> ast::arg;
     // XXX unused self
     fn fn_decl(&self, inputs: ~[ast::arg], output: ast::Ty) -> ast::fn_decl;
 
     fn item_fn_poly(&self,
                     span: Span,
-                    name: ident,
+                    name: Ident,
                     inputs: ~[ast::arg],
                     output: ast::Ty,
                     generics: Generics,
                     body: ast::Block) -> @ast::item;
     fn item_fn(&self,
                span: Span,
-               name: ident,
+               name: Ident,
                inputs: ~[ast::arg],
                output: ast::Ty,
                body: ast::Block) -> @ast::item;
 
-    fn variant(&self, span: Span, name: ident, tys: ~[ast::Ty]) -> ast::variant;
+    fn variant(&self, span: Span, name: Ident, tys: ~[ast::Ty]) -> ast::variant;
     fn item_enum_poly(&self,
                       span: Span,
-                      name: ident,
+                      name: Ident,
                       enum_definition: ast::enum_def,
                       generics: Generics) -> @ast::item;
-    fn item_enum(&self, span: Span, name: ident, enum_def: ast::enum_def) -> @ast::item;
+    fn item_enum(&self, span: Span, name: Ident, enum_def: ast::enum_def) -> @ast::item;
 
     fn item_struct_poly(&self,
                         span: Span,
-                        name: ident,
+                        name: Ident,
                         struct_def: ast::struct_def,
                         generics: Generics) -> @ast::item;
-    fn item_struct(&self, span: Span, name: ident, struct_def: ast::struct_def) -> @ast::item;
+    fn item_struct(&self, span: Span, name: Ident, struct_def: ast::struct_def) -> @ast::item;
 
     fn item_mod(&self, span: Span,
-                name: ident, attrs: ~[ast::Attribute],
+                name: Ident, attrs: ~[ast::Attribute],
                 vi: ~[ast::view_item], items: ~[@ast::item]) -> @ast::item;
 
     fn item_ty_poly(&self,
                     span: Span,
-                    name: ident,
+                    name: Ident,
                     ty: ast::Ty,
                     generics: Generics) -> @ast::item;
-    fn item_ty(&self, span: Span, name: ident, ty: ast::Ty) -> @ast::item;
+    fn item_ty(&self, span: Span, name: Ident, ty: ast::Ty) -> @ast::item;
 
     fn attribute(&self, sp: Span, mi: @ast::MetaItem) -> ast::Attribute;
 
@@ -225,25 +225,25 @@ pub trait AstBuilder {
     fn view_use(&self, sp: Span,
                 vis: ast::visibility, vp: ~[@ast::view_path]) -> ast::view_item;
     fn view_use_list(&self, sp: Span, vis: ast::visibility,
-                     path: ~[ast::ident], imports: &[ast::ident]) -> ast::view_item;
+                     path: ~[ast::Ident], imports: &[ast::Ident]) -> ast::view_item;
     fn view_use_glob(&self, sp: Span,
-                     vis: ast::visibility, path: ~[ast::ident]) -> ast::view_item;
+                     vis: ast::visibility, path: ~[ast::Ident]) -> ast::view_item;
 }
 
 impl AstBuilder for @ExtCtxt {
-    fn path(&self, span: Span, strs: ~[ast::ident]) -> ast::Path {
+    fn path(&self, span: Span, strs: ~[ast::Ident]) -> ast::Path {
         self.path_all(span, false, strs, None, ~[])
     }
-    fn path_ident(&self, span: Span, id: ast::ident) -> ast::Path {
+    fn path_ident(&self, span: Span, id: ast::Ident) -> ast::Path {
         self.path(span, ~[id])
     }
-    fn path_global(&self, span: Span, strs: ~[ast::ident]) -> ast::Path {
+    fn path_global(&self, span: Span, strs: ~[ast::Ident]) -> ast::Path {
         self.path_all(span, true, strs, None, ~[])
     }
     fn path_all(&self,
                 sp: Span,
                 global: bool,
-                mut idents: ~[ast::ident],
+                mut idents: ~[ast::Ident],
                 rp: Option<ast::Lifetime>,
                 types: ~[ast::Ty])
                 -> ast::Path {
@@ -291,7 +291,7 @@ impl AstBuilder for @ExtCtxt {
 
     // Might need to take bounds as an argument in the future, if you ever want
     // to generate a bounded existential trait type.
-    fn ty_ident(&self, span: Span, ident: ast::ident)
+    fn ty_ident(&self, span: Span, ident: ast::Ident)
         -> ast::Ty {
         self.ty_path(self.path_ident(span, ident), None)
     }
@@ -326,7 +326,7 @@ impl AstBuilder for @ExtCtxt {
                           ~[ ty ]), None)
     }
 
-    fn ty_field_imm(&self, span: Span, name: ident, ty: ast::Ty) -> ast::TypeField {
+    fn ty_field_imm(&self, span: Span, name: Ident, ty: ast::Ty) -> ast::TypeField {
         ast::TypeField {
             ident: name,
             mt: ast::mt { ty: ~ty, mutbl: ast::m_imm },
@@ -346,7 +346,7 @@ impl AstBuilder for @ExtCtxt {
         }
     }
 
-    fn typaram(&self, id: ast::ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam {
+    fn typaram(&self, id: ast::Ident, bounds: OptVec<ast::TyParamBound>) -> ast::TyParam {
         ast::TyParam { ident: id, id: self.next_id(), bounds: bounds }
     }
 
@@ -385,7 +385,7 @@ impl AstBuilder for @ExtCtxt {
         ast::TraitTyParamBound(self.trait_ref(path))
     }
 
-    fn lifetime(&self, span: Span, ident: ast::ident) -> ast::Lifetime {
+    fn lifetime(&self, span: Span, ident: ast::Ident) -> ast::Lifetime {
         ast::Lifetime { id: self.next_id(), span: span, ident: ident }
     }
 
@@ -393,7 +393,7 @@ impl AstBuilder for @ExtCtxt {
         @respan(expr.span, ast::stmt_semi(expr, self.next_id()))
     }
 
-    fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::ident, ex: @ast::expr) -> @ast::stmt {
+    fn stmt_let(&self, sp: Span, mutbl: bool, ident: ast::Ident, ex: @ast::expr) -> @ast::stmt {
         let pat = self.pat_ident(sp, ident);
         let local = @ast::Local {
             is_mutbl: mutbl,
@@ -410,7 +410,7 @@ impl AstBuilder for @ExtCtxt {
     fn stmt_let_typed(&self,
                       sp: Span,
                       mutbl: bool,
-                      ident: ast::ident,
+                      ident: ast::Ident,
                       typ: ast::Ty,
                       ex: @ast::expr)
                       -> @ast::stmt {
@@ -461,7 +461,7 @@ impl AstBuilder for @ExtCtxt {
         self.expr(path.span, ast::expr_path(path))
     }
 
-    fn expr_ident(&self, span: Span, id: ast::ident) -> @ast::expr {
+    fn expr_ident(&self, span: Span, id: ast::Ident) -> @ast::expr {
         self.expr_path(self.path_ident(span, id))
     }
     fn expr_self(&self, span: Span) -> @ast::expr {
@@ -485,7 +485,7 @@ impl AstBuilder for @ExtCtxt {
         self.expr_unary(sp, ast::box(ast::m_imm), e)
     }
 
-    fn expr_field_access(&self, sp: Span, expr: @ast::expr, ident: ast::ident) -> @ast::expr {
+    fn expr_field_access(&self, sp: Span, expr: @ast::expr, ident: ast::Ident) -> @ast::expr {
         self.expr(sp, ast::expr_field(expr, ident, ~[]))
     }
     fn expr_addr_of(&self, sp: Span, e: @ast::expr) -> @ast::expr {
@@ -498,18 +498,18 @@ impl AstBuilder for @ExtCtxt {
     fn expr_call(&self, span: Span, expr: @ast::expr, args: ~[@ast::expr]) -> @ast::expr {
         self.expr(span, ast::expr_call(expr, args, ast::NoSugar))
     }
-    fn expr_call_ident(&self, span: Span, id: ast::ident, args: ~[@ast::expr]) -> @ast::expr {
+    fn expr_call_ident(&self, span: Span, id: ast::Ident, args: ~[@ast::expr]) -> @ast::expr {
         self.expr(span,
                   ast::expr_call(self.expr_ident(span, id), args, ast::NoSugar))
     }
-    fn expr_call_global(&self, sp: Span, fn_path: ~[ast::ident],
+    fn expr_call_global(&self, sp: Span, fn_path: ~[ast::Ident],
                       args: ~[@ast::expr]) -> @ast::expr {
         let pathexpr = self.expr_path(self.path_global(sp, fn_path));
         self.expr_call(sp, pathexpr, args)
     }
     fn expr_method_call(&self, span: Span,
                         expr: @ast::expr,
-                        ident: ast::ident,
+                        ident: ast::Ident,
                         args: ~[@ast::expr]) -> @ast::expr {
         self.expr(span,
                   ast::expr_method_call(self.next_id(), expr, ident, ~[], args, ast::NoSugar))
@@ -517,14 +517,14 @@ impl AstBuilder for @ExtCtxt {
     fn expr_block(&self, b: ast::Block) -> @ast::expr {
         self.expr(b.span, ast::expr_block(b))
     }
-    fn field_imm(&self, span: Span, name: ident, e: @ast::expr) -> ast::Field {
+    fn field_imm(&self, span: Span, name: Ident, e: @ast::expr) -> ast::Field {
         ast::Field { ident: name, expr: e, span: span }
     }
     fn expr_struct(&self, span: Span, path: ast::Path, fields: ~[ast::Field]) -> @ast::expr {
         self.expr(span, ast::expr_struct(path, fields, None))
     }
     fn expr_struct_ident(&self, span: Span,
-                         id: ast::ident, fields: ~[ast::Field]) -> @ast::expr {
+                         id: ast::Ident, fields: ~[ast::Field]) -> @ast::expr {
         self.expr_struct(span, self.path_ident(span, id), fields)
     }
 
@@ -591,13 +591,13 @@ impl AstBuilder for @ExtCtxt {
     fn pat_lit(&self, span: Span, expr: @ast::expr) -> @ast::pat {
         self.pat(span, ast::pat_lit(expr))
     }
-    fn pat_ident(&self, span: Span, ident: ast::ident) -> @ast::pat {
+    fn pat_ident(&self, span: Span, ident: ast::Ident) -> @ast::pat {
         self.pat_ident_binding_mode(span, ident, ast::bind_infer)
     }
 
     fn pat_ident_binding_mode(&self,
                               span: Span,
-                              ident: ast::ident,
+                              ident: ast::Ident,
                               bm: ast::binding_mode) -> @ast::pat {
         let path = self.path_ident(span, ident);
         let pat = ast::pat_ident(bm, path, None);
@@ -638,7 +638,7 @@ impl AstBuilder for @ExtCtxt {
     fn lambda_fn_decl(&self, span: Span, fn_decl: ast::fn_decl, blk: ast::Block) -> @ast::expr {
         self.expr(span, ast::expr_fn_block(fn_decl, blk))
     }
-    fn lambda(&self, span: Span, ids: ~[ast::ident], blk: ast::Block) -> @ast::expr {
+    fn lambda(&self, span: Span, ids: ~[ast::Ident], blk: ast::Block) -> @ast::expr {
         let fn_decl = self.fn_decl(
             ids.map(|id| self.arg(span, *id, self.ty_infer(span))),
             self.ty_infer(span));
@@ -658,38 +658,38 @@ impl AstBuilder for @ExtCtxt {
     }
 
     #[cfg(stage0)]
-    fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::ident) -> @ast::expr {
+    fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::expr {
         let ext_cx = *self;
         let blk_e = self.expr(blk.span, ast::expr_block(blk.clone()));
         quote_expr!(|$ident| $blk_e )
     }
     #[cfg(not(stage0))]
-    fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::ident) -> @ast::expr {
+    fn lambda1(&self, _span: Span, blk: ast::Block, ident: ast::Ident) -> @ast::expr {
         let blk_e = self.expr(blk.span, ast::expr_block(blk.clone()));
         quote_expr!(*self, |$ident| $blk_e )
     }
 
-    fn lambda_expr(&self, span: Span, ids: ~[ast::ident], expr: @ast::expr) -> @ast::expr {
+    fn lambda_expr(&self, span: Span, ids: ~[ast::Ident], expr: @ast::expr) -> @ast::expr {
         self.lambda(span, ids, self.block_expr(expr))
     }
     fn lambda_expr_0(&self, span: Span, expr: @ast::expr) -> @ast::expr {
         self.lambda0(span, self.block_expr(expr))
     }
-    fn lambda_expr_1(&self, span: Span, expr: @ast::expr, ident: ast::ident) -> @ast::expr {
+    fn lambda_expr_1(&self, span: Span, expr: @ast::expr, ident: ast::Ident) -> @ast::expr {
         self.lambda1(span, self.block_expr(expr), ident)
     }
 
-    fn lambda_stmts(&self, span: Span, ids: ~[ast::ident], stmts: ~[@ast::stmt]) -> @ast::expr {
+    fn lambda_stmts(&self, span: Span, ids: ~[ast::Ident], stmts: ~[@ast::stmt]) -> @ast::expr {
         self.lambda(span, ids, self.block(span, stmts, None))
     }
     fn lambda_stmts_0(&self, span: Span, stmts: ~[@ast::stmt]) -> @ast::expr {
         self.lambda0(span, self.block(span, stmts, None))
     }
-    fn lambda_stmts_1(&self, span: Span, stmts: ~[@ast::stmt], ident: ast::ident) -> @ast::expr {
+    fn lambda_stmts_1(&self, span: Span, stmts: ~[@ast::stmt], ident: ast::Ident) -> @ast::expr {
         self.lambda1(span, self.block(span, stmts, None), ident)
     }
 
-    fn arg(&self, span: Span, ident: ast::ident, ty: ast::Ty) -> ast::arg {
+    fn arg(&self, span: Span, ident: ast::Ident, ty: ast::Ty) -> ast::arg {
         let arg_pat = self.pat_ident(span, ident);
         ast::arg {
             is_mutbl: false,
@@ -709,7 +709,7 @@ impl AstBuilder for @ExtCtxt {
     }
 
     fn item(&self, span: Span,
-            name: ident, attrs: ~[ast::Attribute], node: ast::item_) -> @ast::item {
+            name: Ident, attrs: ~[ast::Attribute], node: ast::item_) -> @ast::item {
         // XXX: Would be nice if our generated code didn't violate
         // Rust coding conventions
         @ast::item { ident: name,
@@ -722,7 +722,7 @@ impl AstBuilder for @ExtCtxt {
 
     fn item_fn_poly(&self,
                     span: Span,
-                    name: ident,
+                    name: Ident,
                     inputs: ~[ast::arg],
                     output: ast::Ty,
                     generics: Generics,
@@ -739,7 +739,7 @@ impl AstBuilder for @ExtCtxt {
 
     fn item_fn(&self,
                span: Span,
-               name: ident,
+               name: Ident,
                inputs: ~[ast::arg],
                output: ast::Ty,
                body: ast::Block
@@ -753,7 +753,7 @@ impl AstBuilder for @ExtCtxt {
             body)
     }
 
-    fn variant(&self, span: Span, name: ident, tys: ~[ast::Ty]) -> ast::variant {
+    fn variant(&self, span: Span, name: Ident, tys: ~[ast::Ty]) -> ast::variant {
         let args = tys.move_iter().map(|ty| {
             ast::variant_arg { ty: ty, id: self.next_id() }
         }).collect();
@@ -769,13 +769,13 @@ impl AstBuilder for @ExtCtxt {
                })
     }
 
-    fn item_enum_poly(&self, span: Span, name: ident,
+    fn item_enum_poly(&self, span: Span, name: Ident,
                       enum_definition: ast::enum_def,
                       generics: Generics) -> @ast::item {
         self.item(span, name, ~[], ast::item_enum(enum_definition, generics))
     }
 
-    fn item_enum(&self, span: Span, name: ident,
+    fn item_enum(&self, span: Span, name: Ident,
                  enum_definition: ast::enum_def) -> @ast::item {
         self.item_enum_poly(span, name, enum_definition,
                             ast_util::empty_generics())
@@ -784,7 +784,7 @@ impl AstBuilder for @ExtCtxt {
     fn item_struct(
         &self,
         span: Span,
-        name: ident,
+        name: Ident,
         struct_def: ast::struct_def
     ) -> @ast::item {
         self.item_struct_poly(
@@ -798,14 +798,14 @@ impl AstBuilder for @ExtCtxt {
     fn item_struct_poly(
         &self,
         span: Span,
-        name: ident,
+        name: Ident,
         struct_def: ast::struct_def,
         generics: Generics
     ) -> @ast::item {
         self.item(span, name, ~[], ast::item_struct(@struct_def, generics))
     }
 
-    fn item_mod(&self, span: Span, name: ident,
+    fn item_mod(&self, span: Span, name: Ident,
                 attrs: ~[ast::Attribute],
                 vi: ~[ast::view_item],
                 items: ~[@ast::item]) -> @ast::item {
@@ -820,12 +820,12 @@ impl AstBuilder for @ExtCtxt {
         )
     }
 
-    fn item_ty_poly(&self, span: Span, name: ident, ty: ast::Ty,
+    fn item_ty_poly(&self, span: Span, name: Ident, ty: ast::Ty,
                     generics: Generics) -> @ast::item {
         self.item(span, name, ~[], ast::item_ty(ty, generics))
     }
 
-    fn item_ty(&self, span: Span, name: ident, ty: ast::Ty) -> @ast::item {
+    fn item_ty(&self, span: Span, name: Ident, ty: ast::Ty) -> @ast::item {
         self.item_ty_poly(span, name, ty, ast_util::empty_generics())
     }
 
@@ -858,7 +858,7 @@ impl AstBuilder for @ExtCtxt {
     }
 
     fn view_use_list(&self, sp: Span, vis: ast::visibility,
-                     path: ~[ast::ident], imports: &[ast::ident]) -> ast::view_item {
+                     path: ~[ast::Ident], imports: &[ast::Ident]) -> ast::view_item {
         let imports = do imports.map |id| {
             respan(sp, ast::path_list_ident_ { name: *id, id: self.next_id() })
         };
@@ -871,7 +871,7 @@ impl AstBuilder for @ExtCtxt {
     }
 
     fn view_use_glob(&self, sp: Span,
-                     vis: ast::visibility, path: ~[ast::ident]) -> ast::view_item {
+                     vis: ast::visibility, path: ~[ast::Ident]) -> ast::view_item {
         self.view_use(sp, vis,
                       ~[@respan(sp,
                                 ast::view_path_glob(self.path(sp, path), self.next_id()))])
diff --git a/src/libsyntax/ext/deriving/generic.rs b/src/libsyntax/ext/deriving/generic.rs
index c8853e36cdd..eb05f87a8ce 100644
--- a/src/libsyntax/ext/deriving/generic.rs
+++ b/src/libsyntax/ext/deriving/generic.rs
@@ -163,7 +163,7 @@ StaticEnum(<ast::enum_def of C>, ~[(<ident of C0>, Left(1)),
 */
 
 use ast;
-use ast::{enum_def, expr, ident, Generics, struct_def};
+use ast::{enum_def, expr, Ident, Generics, struct_def};
 
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
@@ -216,9 +216,9 @@ pub struct MethodDef<'self> {
 /// All the data about the data structure/method being derived upon.
 pub struct Substructure<'self> {
     /// ident of self
-    type_ident: ident,
+    type_ident: Ident,
     /// ident of the method
-    method_ident: ident,
+    method_ident: Ident,
     /// dereferenced access to any Self or Ptr(Self, _) arguments
     self_args: &'self [@expr],
     /// verbatim access to any other arguments
@@ -234,26 +234,26 @@ pub enum SubstructureFields<'self> {
     ident is the ident of the current field (`None` for all fields in tuple
     structs).
     */
-    Struct(~[(Option<ident>, @expr, ~[@expr])]),
+    Struct(~[(Option<Ident>, @expr, ~[@expr])]),
 
     /**
     Matching variants of the enum: variant index, ast::variant,
     fields: `(field ident, self, [others])`, where the field ident is
     only non-`None` in the case of a struct variant.
     */
-    EnumMatching(uint, &'self ast::variant, ~[(Option<ident>, @expr, ~[@expr])]),
+    EnumMatching(uint, &'self ast::variant, ~[(Option<Ident>, @expr, ~[@expr])]),
 
     /**
     non-matching variants of the enum, [(variant index, ast::variant,
     [field ident, fields])] (i.e. all fields for self are in the
     first tuple, for other1 are in the second tuple, etc.)
     */
-    EnumNonMatching(&'self [(uint, ast::variant, ~[(Option<ident>, @expr)])]),
+    EnumNonMatching(&'self [(uint, ast::variant, ~[(Option<Ident>, @expr)])]),
 
     /// A static method where Self is a struct
-    StaticStruct(&'self ast::struct_def, Either<uint, ~[ident]>),
+    StaticStruct(&'self ast::struct_def, Either<uint, ~[Ident]>),
     /// A static method where Self is an enum
-    StaticEnum(&'self ast::enum_def, ~[(ident, Either<uint, ~[ident]>)])
+    StaticEnum(&'self ast::enum_def, ~[(Ident, Either<uint, ~[Ident]>)])
 }
 
 
@@ -273,7 +273,7 @@ representing each variant: (variant index, ast::variant instance,
 pub type EnumNonMatchFunc<'self> =
     &'self fn(@ExtCtxt, Span,
               &[(uint, ast::variant,
-                 ~[(Option<ident>, @expr)])],
+                 ~[(Option<Ident>, @expr)])],
               &[@expr]) -> @expr;
 
 
@@ -315,7 +315,7 @@ impl<'self> TraitDef<'self> {
      *
      */
     fn create_derived_impl(&self, cx: @ExtCtxt, span: Span,
-                           type_ident: ident, generics: &Generics,
+                           type_ident: Ident, generics: &Generics,
                            methods: ~[@ast::method]) -> @ast::item {
         let trait_path = self.path.to_path(cx, span, type_ident, generics);
 
@@ -375,7 +375,7 @@ impl<'self> TraitDef<'self> {
     fn expand_struct_def(&self, cx: @ExtCtxt,
                          span: Span,
                          struct_def: &struct_def,
-                         type_ident: ident,
+                         type_ident: Ident,
                          generics: &Generics) -> @ast::item {
         let methods = do self.methods.map |method_def| {
             let (explicit_self, self_args, nonself_args, tys) =
@@ -406,7 +406,7 @@ impl<'self> TraitDef<'self> {
     fn expand_enum_def(&self,
                        cx: @ExtCtxt, span: Span,
                        enum_def: &enum_def,
-                       type_ident: ident,
+                       type_ident: Ident,
                        generics: &Generics) -> @ast::item {
         let methods = do self.methods.map |method_def| {
             let (explicit_self, self_args, nonself_args, tys) =
@@ -439,7 +439,7 @@ impl<'self> MethodDef<'self> {
     fn call_substructure_method(&self,
                                 cx: @ExtCtxt,
                                 span: Span,
-                                type_ident: ident,
+                                type_ident: Ident,
                                 self_args: &[@expr],
                                 nonself_args: &[@expr],
                                 fields: &SubstructureFields)
@@ -456,7 +456,7 @@ impl<'self> MethodDef<'self> {
     }
 
     fn get_ret_ty(&self, cx: @ExtCtxt, span: Span,
-                     generics: &Generics, type_ident: ident) -> ast::Ty {
+                     generics: &Generics, type_ident: Ident) -> ast::Ty {
         self.ret_ty.to_ty(cx, span, type_ident, generics)
     }
 
@@ -465,8 +465,8 @@ impl<'self> MethodDef<'self> {
     }
 
     fn split_self_nonself_args(&self, cx: @ExtCtxt, span: Span,
-                             type_ident: ident, generics: &Generics)
-        -> (ast::explicit_self, ~[@expr], ~[@expr], ~[(ident, ast::Ty)]) {
+                             type_ident: Ident, generics: &Generics)
+        -> (ast::explicit_self, ~[@expr], ~[@expr], ~[(Ident, ast::Ty)]) {
 
         let mut self_args = ~[];
         let mut nonself_args = ~[];
@@ -511,10 +511,10 @@ impl<'self> MethodDef<'self> {
     }
 
     fn create_method(&self, cx: @ExtCtxt, span: Span,
-                     type_ident: ident,
+                     type_ident: Ident,
                      generics: &Generics,
                      explicit_self: ast::explicit_self,
-                     arg_types: ~[(ident, ast::Ty)],
+                     arg_types: ~[(Ident, ast::Ty)],
                      body: @expr) -> @ast::method {
         // create the generics that aren't for Self
         let fn_generics = self.generics.to_generics(cx, span, type_ident, generics);
@@ -571,7 +571,7 @@ impl<'self> MethodDef<'self> {
                                  cx: @ExtCtxt,
                                  span: Span,
                                  struct_def: &struct_def,
-                                 type_ident: ident,
+                                 type_ident: Ident,
                                  self_args: &[@expr],
                                  nonself_args: &[@expr])
         -> @expr {
@@ -625,7 +625,7 @@ impl<'self> MethodDef<'self> {
                                         cx: @ExtCtxt,
                                         span: Span,
                                         struct_def: &struct_def,
-                                        type_ident: ident,
+                                        type_ident: Ident,
                                         self_args: &[@expr],
                                         nonself_args: &[@expr])
         -> @expr {
@@ -667,7 +667,7 @@ impl<'self> MethodDef<'self> {
                                cx: @ExtCtxt,
                                span: Span,
                                enum_def: &enum_def,
-                               type_ident: ident,
+                               type_ident: Ident,
                                self_args: &[@expr],
                                nonself_args: &[@expr])
         -> @expr {
@@ -702,12 +702,12 @@ impl<'self> MethodDef<'self> {
     fn build_enum_match(&self,
                         cx: @ExtCtxt, span: Span,
                         enum_def: &enum_def,
-                        type_ident: ident,
+                        type_ident: Ident,
                         self_args: &[@expr],
                         nonself_args: &[@expr],
                         matching: Option<uint>,
                         matches_so_far: &mut ~[(uint, ast::variant,
-                                              ~[(Option<ident>, @expr)])],
+                                              ~[(Option<Ident>, @expr)])],
                         match_count: uint) -> @expr {
         if match_count == self_args.len() {
             // we've matched against all arguments, so make the final
@@ -852,7 +852,7 @@ impl<'self> MethodDef<'self> {
                                cx: @ExtCtxt,
                                span: Span,
                                enum_def: &enum_def,
-                               type_ident: ident,
+                               type_ident: Ident,
                                self_args: &[@expr],
                                nonself_args: &[@expr])
         -> @expr {
@@ -874,7 +874,7 @@ impl<'self> MethodDef<'self> {
 }
 
 fn summarise_struct(cx: @ExtCtxt, span: Span,
-                    struct_def: &struct_def) -> Either<uint, ~[ident]> {
+                    struct_def: &struct_def) -> Either<uint, ~[Ident]> {
     let mut named_idents = ~[];
     let mut unnamed_count = 0;
     for field in struct_def.fields.iter() {
@@ -913,11 +913,11 @@ enum StructType {
 
 fn create_struct_pattern(cx: @ExtCtxt,
                              span: Span,
-                             struct_ident: ident,
+                             struct_ident: Ident,
                              struct_def: &struct_def,
                              prefix: &str,
                              mutbl: ast::mutability)
-    -> (@ast::pat, ~[(Option<ident>, @expr)]) {
+    -> (@ast::pat, ~[(Option<Ident>, @expr)]) {
     if struct_def.fields.is_empty() {
         return (
             cx.pat_ident_binding_mode(
@@ -977,7 +977,7 @@ fn create_enum_variant_pattern(cx: @ExtCtxt,
                                    variant: &ast::variant,
                                    prefix: &str,
                                    mutbl: ast::mutability)
-    -> (@ast::pat, ~[(Option<ident>, @expr)]) {
+    -> (@ast::pat, ~[(Option<Ident>, @expr)]) {
 
     let variant_ident = variant.node.name;
     match variant.node.kind {
diff --git a/src/libsyntax/ext/deriving/mod.rs b/src/libsyntax/ext/deriving/mod.rs
index 0123044478c..7fd44bfad01 100644
--- a/src/libsyntax/ext/deriving/mod.rs
+++ b/src/libsyntax/ext/deriving/mod.rs
@@ -18,7 +18,7 @@ library.
 
 */
 
-use ast::{enum_def, ident, item, Generics, struct_def};
+use ast::{enum_def, Ident, item, Generics, struct_def};
 use ast::{MetaItem, MetaList, MetaNameValue, MetaWord};
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
@@ -47,13 +47,13 @@ pub mod generic;
 pub type ExpandDerivingStructDefFn<'self> = &'self fn(@ExtCtxt,
                                                        Span,
                                                        x: &struct_def,
-                                                       ident,
+                                                       Ident,
                                                        y: &Generics)
                                                  -> @item;
 pub type ExpandDerivingEnumDefFn<'self> = &'self fn(@ExtCtxt,
                                                     Span,
                                                     x: &enum_def,
-                                                    ident,
+                                                    Ident,
                                                     y: &Generics)
                                                  -> @item;
 
diff --git a/src/libsyntax/ext/deriving/rand.rs b/src/libsyntax/ext/deriving/rand.rs
index 485df6084a8..b24c8eb84ab 100644
--- a/src/libsyntax/ext/deriving/rand.rs
+++ b/src/libsyntax/ext/deriving/rand.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use ast;
-use ast::{MetaItem, item, expr, ident};
+use ast::{MetaItem, item, expr, Ident};
 use codemap::Span;
 use ext::base::ExtCtxt;
 use ext::build::{AstBuilder, Duplicate};
@@ -129,8 +129,8 @@ fn rand_substructure(cx: @ExtCtxt, span: Span, substr: &Substructure) -> @expr {
     };
 
     fn rand_thing(cx: @ExtCtxt, span: Span,
-                  ctor_ident: ident,
-                  summary: &Either<uint, ~[ident]>,
+                  ctor_ident: Ident,
+                  summary: &Either<uint, ~[Ident]>,
                   rand_call: &fn() -> @expr) -> @expr {
         match *summary {
             Left(count) => {
diff --git a/src/libsyntax/ext/deriving/to_str.rs b/src/libsyntax/ext/deriving/to_str.rs
index 1b136983de8..eecce06f69f 100644
--- a/src/libsyntax/ext/deriving/to_str.rs
+++ b/src/libsyntax/ext/deriving/to_str.rs
@@ -47,8 +47,8 @@ fn to_str_substructure(cx: @ExtCtxt, span: Span,
                        substr: &Substructure) -> @expr {
     let to_str = cx.ident_of("to_str");
 
-    let doit = |start: &str, end: @str, name: ast::ident,
-                fields: &[(Option<ast::ident>, @expr, ~[@expr])]| {
+    let doit = |start: &str, end: @str, name: ast::Ident,
+                fields: &[(Option<ast::Ident>, @expr, ~[@expr])]| {
         if fields.len() == 0 {
             cx.expr_str_uniq(span, cx.str_of(name))
         } else {
diff --git a/src/libsyntax/ext/deriving/ty.rs b/src/libsyntax/ext/deriving/ty.rs
index f0b22d9b288..6c1b8100f42 100644
--- a/src/libsyntax/ext/deriving/ty.rs
+++ b/src/libsyntax/ext/deriving/ty.rs
@@ -14,7 +14,7 @@ explicit `Self` type to use when specifying impls to be derived.
 */
 
 use ast;
-use ast::{expr,Generics,ident};
+use ast::{expr,Generics,Ident};
 use ext::base::ExtCtxt;
 use ext::build::AstBuilder;
 use codemap::{Span,respan};
@@ -59,7 +59,7 @@ impl<'self> Path<'self> {
     pub fn to_ty(&self,
                  cx: @ExtCtxt,
                  span: Span,
-                 self_ty: ident,
+                 self_ty: Ident,
                  self_generics: &Generics)
                  -> ast::Ty {
         cx.ty_path(self.to_path(cx, span, self_ty, self_generics), None)
@@ -67,7 +67,7 @@ impl<'self> Path<'self> {
     pub fn to_path(&self,
                    cx: @ExtCtxt,
                    span: Span,
-                   self_ty: ident,
+                   self_ty: Ident,
                    self_generics: &Generics)
                    -> ast::Path {
         let idents = self.path.map(|s| cx.ident_of(*s) );
@@ -120,7 +120,7 @@ impl<'self> Ty<'self> {
     pub fn to_ty(&self,
                  cx: @ExtCtxt,
                  span: Span,
-                 self_ty: ident,
+                 self_ty: Ident,
                  self_generics: &Generics)
                  -> ast::Ty {
         match *self {
@@ -158,7 +158,7 @@ impl<'self> Ty<'self> {
     pub fn to_path(&self,
                    cx: @ExtCtxt,
                    span: Span,
-                   self_ty: ident,
+                   self_ty: Ident,
                    self_generics: &Generics)
                    -> ast::Path {
         match *self {
@@ -186,7 +186,7 @@ impl<'self> Ty<'self> {
 
 
 fn mk_ty_param(cx: @ExtCtxt, span: Span, name: &str, bounds: &[Path],
-               self_ident: ident, self_generics: &Generics) -> ast::TyParam {
+               self_ident: Ident, self_generics: &Generics) -> ast::TyParam {
     let bounds = opt_vec::from(
         do bounds.map |b| {
             let path = b.to_path(cx, span, self_ident, self_generics);
@@ -217,7 +217,7 @@ impl<'self> LifetimeBounds<'self> {
     pub fn to_generics(&self,
                        cx: @ExtCtxt,
                        span: Span,
-                       self_ty: ident,
+                       self_ty: Ident,
                        self_generics: &Generics)
                        -> Generics {
         let lifetimes = do self.lifetimes.map |lt| {
diff --git a/src/libsyntax/ext/expand.rs b/src/libsyntax/ext/expand.rs
index eb1eaffe757..0827a9fabee 100644
--- a/src/libsyntax/ext/expand.rs
+++ b/src/libsyntax/ext/expand.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use ast::{Block, Crate, NodeId, expr_, expr_mac, ident, mac_invoc_tt};
+use ast::{Block, Crate, NodeId, expr_, expr_mac, Ident, mac_invoc_tt};
 use ast::{item_mac, stmt_, stmt_mac, stmt_expr, stmt_semi};
 use ast::{illegal_ctxt};
 use ast;
@@ -140,7 +140,7 @@ pub fn expand_expr(extsbox: @mut SyntaxEnv,
                 }
             }
 
-            fn mk_simple_path(ident: ast::ident, span: Span) -> ast::Path {
+            fn mk_simple_path(ident: ast::Ident, span: Span) -> ast::Path {
                 ast::Path {
                     span: span,
                     global: false,
@@ -523,7 +523,7 @@ pub fn expand_stmt(extsbox: @mut SyntaxEnv,
 
 #[deriving(Clone)]
 struct NewNameFinderContext {
-    ident_accumulator: @mut ~[ast::ident],
+    ident_accumulator: @mut ~[ast::Ident],
 }
 
 impl Visitor<()> for NewNameFinderContext {
@@ -645,7 +645,7 @@ impl Visitor<()> for NewNameFinderContext {
 
     fn visit_struct_def(&mut self,
                         struct_def: @ast::struct_def,
-                        ident: ident,
+                        ident: Ident,
                         generics: &ast::Generics,
                         node_id: NodeId,
                         _: ()) {
@@ -667,7 +667,7 @@ impl Visitor<()> for NewNameFinderContext {
 // return a visitor that extracts the pat_ident paths
 // from a given pattern and puts them in a mutable
 // array (passed in to the traversal)
-pub fn new_name_finder(idents: @mut ~[ast::ident]) -> @mut Visitor<()> {
+pub fn new_name_finder(idents: @mut ~[ast::Ident]) -> @mut Visitor<()> {
     let context = @mut NewNameFinderContext {
         ident_accumulator: idents,
     };
@@ -697,7 +697,7 @@ fn get_block_info(exts : SyntaxEnv) -> BlockInfo {
 
 // given a mutable list of renames, return a tree-folder that applies those
 // renames.
-fn renames_to_fold(renames : @mut ~[(ast::ident,ast::Name)]) -> @ast_fold {
+fn renames_to_fold(renames : @mut ~[(ast::Ident,ast::Name)]) -> @ast_fold {
     let afp = default_ast_fold();
     let f_pre = @AstFoldFns {
         fold_ident: |id,_| {
@@ -706,7 +706,7 @@ fn renames_to_fold(renames : @mut ~[(ast::ident,ast::Name)]) -> @ast_fold {
             let new_ctxt = renames.iter().fold(id.ctxt,|ctxt,&(from,to)| {
                 new_rename(from,to,ctxt)
             });
-            ast::ident{name:id.name,ctxt:new_ctxt}
+            ast::Ident{name:id.name,ctxt:new_ctxt}
         },
         .. *afp
     };
@@ -1144,7 +1144,7 @@ pub fn expand_crate(parse_sess: @mut parse::ParseSess,
 
 // given a function from idents to idents, produce
 // an ast_fold that applies that function:
-pub fn fun_to_ident_folder(f: @fn(ast::ident)->ast::ident) -> @ast_fold{
+pub fn fun_to_ident_folder(f: @fn(ast::Ident)->ast::Ident) -> @ast_fold{
     let afp = default_ast_fold();
     let f_pre = @AstFoldFns{
         fold_ident : |id, _| f(id),
@@ -1154,11 +1154,11 @@ pub fn fun_to_ident_folder(f: @fn(ast::ident)->ast::ident) -> @ast_fold{
 }
 
 // update the ctxts in a path to get a rename node
-pub fn new_ident_renamer(from: ast::ident,
+pub fn new_ident_renamer(from: ast::Ident,
                       to: ast::Name) ->
-    @fn(ast::ident)->ast::ident {
-    |id : ast::ident|
-    ast::ident{
+    @fn(ast::Ident)->ast::Ident {
+    |id : ast::Ident|
+    ast::Ident{
         name: id.name,
         ctxt: new_rename(from,to,id.ctxt)
     }
@@ -1167,9 +1167,9 @@ pub fn new_ident_renamer(from: ast::ident,
 
 // update the ctxts in a path to get a mark node
 pub fn new_ident_marker(mark: uint) ->
-    @fn(ast::ident)->ast::ident {
-    |id : ast::ident|
-    ast::ident{
+    @fn(ast::Ident)->ast::Ident {
+    |id : ast::Ident|
+    ast::Ident{
         name: id.name,
         ctxt: new_mark(mark,id.ctxt)
     }
@@ -1178,9 +1178,9 @@ pub fn new_ident_marker(mark: uint) ->
 // perform resolution (in the MTWT sense) on all of the
 // idents in the tree. This is the final step in expansion.
 pub fn new_ident_resolver() ->
-    @fn(ast::ident)->ast::ident {
-    |id : ast::ident|
-    ast::ident {
+    @fn(ast::Ident)->ast::Ident {
+    |id : ast::Ident|
+    ast::Ident {
         name : resolve(id),
         ctxt : illegal_ctxt
     }
@@ -1304,7 +1304,7 @@ mod test {
         };
         let a_name = intern("a");
         let a2_name = intern("a2");
-        let renamer = new_ident_renamer(ast::ident{name:a_name,ctxt:empty_ctxt},
+        let renamer = new_ident_renamer(ast::Ident{name:a_name,ctxt:empty_ctxt},
                                         a2_name);
         let renamed_ast = fun_to_ident_folder(renamer).fold_item(item_ast).unwrap();
         let resolver = new_ident_resolver();
diff --git a/src/libsyntax/ext/fmt.rs b/src/libsyntax/ext/fmt.rs
index 4bfb4da7a49..4e7275b75c8 100644
--- a/src/libsyntax/ext/fmt.rs
+++ b/src/libsyntax/ext/fmt.rs
@@ -50,7 +50,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree])
 fn pieces_to_expr(cx: @ExtCtxt, sp: Span,
                   pieces: ~[Piece], args: ~[@ast::expr])
    -> @ast::expr {
-    fn make_path_vec(ident: &str) -> ~[ast::ident] {
+    fn make_path_vec(ident: &str) -> ~[ast::Ident] {
         return ~[str_to_ident("std"),
                  str_to_ident("unstable"),
                  str_to_ident("extfmt"),
diff --git a/src/libsyntax/ext/ifmt.rs b/src/libsyntax/ext/ifmt.rs
index eab5f657775..474c0ce60a7 100644
--- a/src/libsyntax/ext/ifmt.rs
+++ b/src/libsyntax/ext/ifmt.rs
@@ -637,7 +637,7 @@ impl Context {
     }
 
     fn format_arg(&self, sp: Span, arg: Either<uint, @str>,
-                  ident: ast::ident) -> @ast::expr {
+                  ident: ast::Ident) -> @ast::expr {
         let ty = match arg {
             Left(i) => self.arg_types[i].unwrap(),
             Right(s) => *self.name_types.get(&s)
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 05e639632ed..bea18d868a0 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -68,7 +68,7 @@ pub mod rt {
         fn to_source(&self) -> @str;
     }
 
-    impl ToSource for ast::ident {
+    impl ToSource for ast::Ident {
         fn to_source(&self) -> @str {
             ident_to_str(self)
         }
@@ -216,7 +216,7 @@ pub mod rt {
         )
     )
 
-    impl_to_tokens!(ast::ident)
+    impl_to_tokens!(ast::Ident)
     impl_to_tokens!(@ast::item)
     impl_to_tokens_self!(&'self [@ast::item])
     impl_to_tokens!(ast::Ty)
@@ -334,16 +334,16 @@ pub fn expand_quote_stmt(cx: @ExtCtxt,
                                     ~[e_attrs], tts))
 }
 
-fn ids_ext(strs: ~[~str]) -> ~[ast::ident] {
+fn ids_ext(strs: ~[~str]) -> ~[ast::Ident] {
     strs.map(|str| str_to_ident(*str))
 }
 
-fn id_ext(str: &str) -> ast::ident {
+fn id_ext(str: &str) -> ast::Ident {
     str_to_ident(str)
 }
 
 // Lift an ident to the expr that evaluates to that ident.
-fn mk_ident(cx: @ExtCtxt, sp: Span, ident: ast::ident) -> @ast::expr {
+fn mk_ident(cx: @ExtCtxt, sp: Span, ident: ast::Ident) -> @ast::expr {
     let e_str = cx.expr_str(sp, cx.str_of(ident));
     cx.expr_method_call(sp,
                         cx.expr_ident(sp, id_ext("ext_cx")),
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs
index bc4b1010943..7a9e916421c 100644
--- a/src/libsyntax/ext/tt/macro_parser.rs
+++ b/src/libsyntax/ext/tt/macro_parser.rs
@@ -11,7 +11,7 @@
 // Earley-like parser for macros.
 
 use ast;
-use ast::{matcher, match_tok, match_seq, match_nonterminal, ident};
+use ast::{matcher, match_tok, match_seq, match_nonterminal, Ident};
 use codemap::{BytePos, mk_sp};
 use codemap;
 use parse::lexer::*; //resolve bug?
@@ -189,9 +189,9 @@ pub enum named_match {
 pub type earley_item = ~MatcherPos;
 
 pub fn nameize(p_s: @mut ParseSess, ms: &[matcher], res: &[@named_match])
-            -> HashMap<ident,@named_match> {
+            -> HashMap<Ident,@named_match> {
     fn n_rec(p_s: @mut ParseSess, m: &matcher, res: &[@named_match],
-             ret_val: &mut HashMap<ident, @named_match>) {
+             ret_val: &mut HashMap<Ident, @named_match>) {
         match *m {
           codemap::Spanned {node: match_tok(_), _} => (),
           codemap::Spanned {node: match_seq(ref more_ms, _, _, _, _), _} => {
@@ -216,7 +216,7 @@ pub fn nameize(p_s: @mut ParseSess, ms: &[matcher], res: &[@named_match])
 }
 
 pub enum parse_result {
-    success(HashMap<ident, @named_match>),
+    success(HashMap<Ident, @named_match>),
     failure(codemap::Span, ~str),
     error(codemap::Span, ~str)
 }
@@ -226,7 +226,7 @@ pub fn parse_or_else(
     cfg: ast::CrateConfig,
     rdr: @mut reader,
     ms: ~[matcher]
-) -> HashMap<ident, @named_match> {
+) -> HashMap<Ident, @named_match> {
     match parse(sess, cfg, rdr, ms) {
       success(m) => m,
       failure(sp, str) => sess.span_diagnostic.span_fatal(sp, str),
diff --git a/src/libsyntax/ext/tt/macro_rules.rs b/src/libsyntax/ext/tt/macro_rules.rs
index f336098468b..732ae2ccb96 100644
--- a/src/libsyntax/ext/tt/macro_rules.rs
+++ b/src/libsyntax/ext/tt/macro_rules.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use ast::{ident, matcher_, matcher, match_tok, match_nonterminal, match_seq};
+use ast::{Ident, matcher_, matcher, match_tok, match_nonterminal, match_seq};
 use ast::{tt_delim};
 use ast;
 use codemap::{Span, Spanned, dummy_sp};
@@ -25,7 +25,7 @@ use print;
 
 pub fn add_new_extension(cx: @ExtCtxt,
                          sp: Span,
-                         name: ident,
+                         name: Ident,
                          arg: ~[ast::token_tree])
                       -> base::MacResult {
     // these spans won't matter, anyways
@@ -74,7 +74,7 @@ pub fn add_new_extension(cx: @ExtCtxt,
     };
 
     // Given `lhses` and `rhses`, this is the new macro we create
-    fn generic_extension(cx: @ExtCtxt, sp: Span, name: ident,
+    fn generic_extension(cx: @ExtCtxt, sp: Span, name: Ident,
                          arg: &[ast::token_tree],
                          lhses: &[@named_match], rhses: &[@named_match])
     -> MacResult {
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 668805bf7a8..8a858f3d985 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -9,7 +9,7 @@
 // except according to those terms.
 
 use ast;
-use ast::{token_tree, tt_delim, tt_tok, tt_seq, tt_nonterminal,ident};
+use ast::{token_tree, tt_delim, tt_tok, tt_seq, tt_nonterminal,Ident};
 use codemap::{Span, dummy_sp};
 use diagnostic::span_handler;
 use ext::tt::macro_parser::{named_match, matched_seq, matched_nonterminal};
@@ -34,7 +34,7 @@ pub struct TtReader {
     // the unzipped tree:
     stack: @mut TtFrame,
     /* for MBE-style macro transcription */
-    interpolations: HashMap<ident, @named_match>,
+    interpolations: HashMap<Ident, @named_match>,
     repeat_idx: ~[uint],
     repeat_len: ~[uint],
     /* cached: */
@@ -46,7 +46,7 @@ pub struct TtReader {
  *  `src` contains no `tt_seq`s and `tt_nonterminal`s, `interp` can (and
  *  should) be none. */
 pub fn new_tt_reader(sp_diag: @mut span_handler,
-                     interp: Option<HashMap<ident,@named_match>>,
+                     interp: Option<HashMap<Ident,@named_match>>,
                      src: ~[ast::token_tree])
                   -> @mut TtReader {
     let r = @mut TtReader {
@@ -113,7 +113,7 @@ fn lookup_cur_matched_by_matched(r: &mut TtReader,
     r.repeat_idx.iter().fold(start, red)
 }
 
-fn lookup_cur_matched(r: &mut TtReader, name: ident) -> @named_match {
+fn lookup_cur_matched(r: &mut TtReader, name: Ident) -> @named_match {
     match r.interpolations.find_copy(&name) {
         Some(s) => lookup_cur_matched_by_matched(r, s),
         None => {
@@ -126,7 +126,7 @@ fn lookup_cur_matched(r: &mut TtReader, name: ident) -> @named_match {
 #[deriving(Clone)]
 enum lis {
     lis_unconstrained,
-    lis_constraint(uint, ident),
+    lis_constraint(uint, Ident),
     lis_contradiction(~str),
 }