Skip to content

Commit cc92e38

Browse files
pcwaltonhuonw
authored andcommitted
---
yaml --- r: 107870 b: refs/heads/dist-snap c: 344040d h: refs/heads/master v: v3
1 parent 6abfaa2 commit cc92e38

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 64a3a4169c08dd8f9687605f256e7e1eeaa07ce0
9+
refs/heads/dist-snap: 344040d470262bef014f3db8d634f2cec4ddfed1
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1893,8 +1893,9 @@ impl Resolver {
18931893
csearch::each_child_of_item(self.session.cstore,
18941894
def_id,
18951895
|def_like, child_ident, visibility| {
1896+
let child_ident_string = token::get_ident(child_ident.name);
18961897
debug!("(populating external module) ... found ident: {}",
1897-
token::ident_to_str(&child_ident));
1898+
child_ident_string.get());
18981899
self.build_reduced_graph_for_external_crate_def(module,
18991900
def_like,
19001901
child_ident,
@@ -3102,11 +3103,12 @@ impl Resolver {
31023103
// top of the crate otherwise.
31033104
let mut containing_module;
31043105
let mut i;
3105-
if "self" == token::ident_to_str(&module_path[0]) {
3106+
let first_module_path_string = token::get_ident(module_path[0].name);
3107+
if "self" == first_module_path_string.get() {
31063108
containing_module =
31073109
self.get_nearest_normal_module_parent_or_self(module_);
31083110
i = 1;
3109-
} else if "super" == token::ident_to_str(&module_path[0]) {
3111+
} else if "super" == first_module_path_string.get() {
31103112
containing_module =
31113113
self.get_nearest_normal_module_parent_or_self(module_);
31123114
i = 0; // We'll handle `super` below.
@@ -3115,8 +3117,11 @@ impl Resolver {
31153117
}
31163118

31173119
// Now loop through all the `super`s we find.
3118-
while i < module_path.len() &&
3119-
"super" == token::ident_to_str(&module_path[i]) {
3120+
while i < module_path.len() {
3121+
let string = token::get_ident(module_path[i].name);
3122+
if "super" != string.get() {
3123+
break
3124+
}
31203125
debug!("(resolving module prefix) resolving `super` at {}",
31213126
self.module_to_str(containing_module));
31223127
match self.get_nearest_normal_module_parent(containing_module) {

0 commit comments

Comments
 (0)