@@ -55,7 +55,7 @@ use rustc::util::nodemap::{NodeMap, NodeSet, FnvHashMap, FnvHashSet};
55
55
56
56
use syntax:: ext:: hygiene:: Mark ;
57
57
use syntax:: ast:: { self , FloatTy } ;
58
- use syntax:: ast:: { CRATE_NODE_ID , Name , NodeId , IntTy , UintTy } ;
58
+ use syntax:: ast:: { CRATE_NODE_ID , Name , NodeId , Ident , IntTy , UintTy } ;
59
59
use syntax:: ext:: base:: SyntaxExtension ;
60
60
use syntax:: parse:: token:: { self , keywords} ;
61
61
use syntax:: util:: lev_distance:: find_best_match_for_name;
@@ -509,7 +509,7 @@ struct BindingInfo {
509
509
}
510
510
511
511
// Map from the name in a pattern to its binding mode.
512
- type BindingMap = FnvHashMap < ast :: Ident , BindingInfo > ;
512
+ type BindingMap = FnvHashMap < Ident , BindingInfo > ;
513
513
514
514
#[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
515
515
enum PatternSource {
@@ -714,7 +714,7 @@ enum ModulePrefixResult<'a> {
714
714
/// One local scope.
715
715
#[ derive( Debug ) ]
716
716
struct Rib < ' a > {
717
- bindings : FnvHashMap < ast :: Ident , Def > ,
717
+ bindings : FnvHashMap < Ident , Def > ,
718
718
kind : RibKind < ' a > ,
719
719
}
720
720
@@ -1479,7 +1479,7 @@ impl<'a> Resolver<'a> {
1479
1479
// This is not a crate-relative path. We resolve the
1480
1480
// first component of the path in the current lexical
1481
1481
// scope and then proceed to resolve below that.
1482
- let ident = ast :: Ident :: with_empty_ctxt ( module_path[ 0 ] ) ;
1482
+ let ident = Ident :: with_empty_ctxt ( module_path[ 0 ] ) ;
1483
1483
let lexical_binding =
1484
1484
self . resolve_ident_in_lexical_scope ( ident, TypeNS , span) ;
1485
1485
if let Some ( binding) = lexical_binding. and_then ( LexicalScopeBinding :: item) {
@@ -1525,12 +1525,12 @@ impl<'a> Resolver<'a> {
1525
1525
/// Invariant: This must only be called during main resolution, not during
1526
1526
/// import resolution.
1527
1527
fn resolve_ident_in_lexical_scope ( & mut self ,
1528
- mut ident : ast :: Ident ,
1528
+ mut ident : Ident ,
1529
1529
ns : Namespace ,
1530
1530
record_used : Option < Span > )
1531
1531
-> Option < LexicalScopeBinding < ' a > > {
1532
1532
if ns == TypeNS {
1533
- ident = ast :: Ident :: with_empty_ctxt ( ident. name ) ;
1533
+ ident = Ident :: with_empty_ctxt ( ident. name ) ;
1534
1534
}
1535
1535
1536
1536
// Walk backwards up the ribs in scope.
@@ -1649,7 +1649,7 @@ impl<'a> Resolver<'a> {
1649
1649
1650
1650
/// Searches the current set of local scopes for labels.
1651
1651
/// Stops after meeting a closure.
1652
- fn search_label ( & self , mut ident : ast :: Ident ) -> Option < Def > {
1652
+ fn search_label ( & self , mut ident : Ident ) -> Option < Def > {
1653
1653
for rib in self . label_ribs . iter ( ) . rev ( ) {
1654
1654
match rib. kind {
1655
1655
NormalRibKind => {
@@ -1813,7 +1813,7 @@ impl<'a> Resolver<'a> {
1813
1813
// plain insert (no renaming)
1814
1814
let def_id = self . definitions . local_def_id ( type_parameter. id ) ;
1815
1815
let def = Def :: TyParam ( def_id) ;
1816
- function_type_rib. bindings . insert ( ast :: Ident :: with_empty_ctxt ( name) , def) ;
1816
+ function_type_rib. bindings . insert ( Ident :: with_empty_ctxt ( name) , def) ;
1817
1817
self . record_def ( type_parameter. id , PathResolution :: new ( def) ) ;
1818
1818
}
1819
1819
self . type_ribs . push ( function_type_rib) ;
@@ -2271,7 +2271,7 @@ impl<'a> Resolver<'a> {
2271
2271
pat_id : NodeId ,
2272
2272
outer_pat_id : NodeId ,
2273
2273
pat_src : PatternSource ,
2274
- bindings : & mut FnvHashMap < ast :: Ident , NodeId > )
2274
+ bindings : & mut FnvHashMap < Ident , NodeId > )
2275
2275
-> PathResolution {
2276
2276
// Add the binding to the local ribs, if it
2277
2277
// doesn't already exist in the bindings map. (We
@@ -2372,7 +2372,7 @@ impl<'a> Resolver<'a> {
2372
2372
pat_src : PatternSource ,
2373
2373
// Maps idents to the node ID for the
2374
2374
// outermost pattern that binds them.
2375
- bindings : & mut FnvHashMap < ast :: Ident , NodeId > ) {
2375
+ bindings : & mut FnvHashMap < Ident , NodeId > ) {
2376
2376
// Visit all direct subpatterns of this pattern.
2377
2377
let outer_pat_id = pat. id ;
2378
2378
pat. walk ( & mut |pat| {
@@ -2573,7 +2573,7 @@ impl<'a> Resolver<'a> {
2573
2573
2574
2574
// Resolve a single identifier
2575
2575
fn resolve_identifier ( & mut self ,
2576
- identifier : ast :: Ident ,
2576
+ identifier : Ident ,
2577
2577
namespace : Namespace ,
2578
2578
record_used : Option < Span > )
2579
2579
-> Option < LocalDef > {
@@ -2835,7 +2835,7 @@ impl<'a> Resolver<'a> {
2835
2835
} SuggestionType :: NotFound
2836
2836
}
2837
2837
2838
- fn resolve_labeled_block ( & mut self , label : Option < ast :: Ident > , id : NodeId , block : & Block ) {
2838
+ fn resolve_labeled_block ( & mut self , label : Option < Ident > , id : NodeId , block : & Block ) {
2839
2839
if let Some ( label) = label {
2840
2840
let def = Def :: Label ( id) ;
2841
2841
self . with_label_rib ( |this| {
@@ -3237,7 +3237,7 @@ impl<'a> Resolver<'a> {
3237
3237
if name == lookup_name && ns == namespace {
3238
3238
if filter_fn ( name_binding. def ( ) ) {
3239
3239
// create the path
3240
- let ident = ast :: Ident :: with_empty_ctxt ( name) ;
3240
+ let ident = Ident :: with_empty_ctxt ( name) ;
3241
3241
let params = PathParameters :: none ( ) ;
3242
3242
let segment = PathSegment {
3243
3243
identifier : ident,
@@ -3271,7 +3271,7 @@ impl<'a> Resolver<'a> {
3271
3271
_ if module. parent . is_none ( ) => path_segments. clone ( ) ,
3272
3272
ModuleKind :: Def ( _, name) => {
3273
3273
let mut paths = path_segments. clone ( ) ;
3274
- let ident = ast :: Ident :: with_empty_ctxt ( name) ;
3274
+ let ident = Ident :: with_empty_ctxt ( name) ;
3275
3275
let params = PathParameters :: none ( ) ;
3276
3276
let segm = PathSegment {
3277
3277
identifier : ident,
0 commit comments