File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
branches/try2/src/librustc/middle Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 72ee6af4d4e4d16a81e3f518f9c75f513a9a7dea
8
+ refs/heads/try2: 7fd5bdcb9a6d090276c0366f2c55975c153ac088
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -4706,25 +4706,13 @@ impl Resolver {
4706
4706
return NoNameDefinition ;
4707
4707
}
4708
4708
4709
- pub fn intern_module_part_of_path ( @mut self , path : & Path ) -> ~[ Ident ] {
4710
- let mut module_path_idents = ~[ ] ;
4711
- for ( index, segment) in path. segments . iter ( ) . enumerate ( ) {
4712
- if index == path. segments . len ( ) - 1 {
4713
- break ;
4714
- }
4715
-
4716
- module_path_idents. push ( segment. identifier ) ;
4717
- }
4718
-
4719
- return module_path_idents;
4720
- }
4721
-
4709
+ // resolve a "module-relative" path, e.g. a::b::c
4722
4710
pub fn resolve_module_relative_path ( @mut self ,
4723
4711
path : & Path ,
4724
4712
xray : XrayFlag ,
4725
4713
namespace : Namespace )
4726
4714
-> Option < Def > {
4727
- let module_path_idents = self . intern_module_part_of_path ( path ) ;
4715
+ let module_path_idents = path . segments . init ( ) . map ( |ps| ps . identifier ) ;
4728
4716
4729
4717
let containing_module;
4730
4718
match self . resolve_module_path ( self . current_module ,
@@ -4790,7 +4778,7 @@ impl Resolver {
4790
4778
xray : XrayFlag ,
4791
4779
namespace : Namespace )
4792
4780
-> Option < Def > {
4793
- let module_path_idents = self . intern_module_part_of_path ( path ) ;
4781
+ let module_path_idents = path . segments . init ( ) . map ( |ps| ps . identifier ) ;
4794
4782
4795
4783
let root_module = self . graph_root . get_module ( ) ;
4796
4784
You can’t perform that action at this time.
0 commit comments