Skip to content

Commit

Permalink
Refactor path resoloution.
Browse files Browse the repository at this point in the history
  • Loading branch information
jseyfried committed Nov 29, 2016
1 parent cb9f14e commit af2d89c
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 546 deletions.
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Expand Up @@ -77,7 +77,7 @@ pub struct LoweringContext<'a> {

pub trait Resolver {
// Resolve a global hir path generated by the lowerer when expanding `for`, `if let`, etc.
fn resolve_generated_global_path(&mut self, path: &mut hir::Path, is_value: bool);
fn resolve_hir_path(&mut self, path: &mut hir::Path, is_value: bool);

// Obtain the resolution for a node id
fn get_resolution(&mut self, id: NodeId) -> Option<PathResolution>;
Expand Down Expand Up @@ -2091,7 +2091,7 @@ impl<'a> LoweringContext<'a> {
segments: segments.into(),
};

self.resolver.resolve_generated_global_path(&mut path, is_value);
self.resolver.resolve_hir_path(&mut path, is_value);
path
}

Expand Down

0 comments on commit af2d89c

Please sign in to comment.