Skip to content

Commit bfca1ca

Browse files
pcwaltonhuonw
authored andcommitted
---
yaml --- r: 102543 b: refs/heads/auto c: 344040d h: refs/heads/master i: 102541: cceb846 102539: a8feacf 102535: 3e954dc 102527: 17c407c v: v3
1 parent fca9b83 commit bfca1ca

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 64a3a4169c08dd8f9687605f256e7e1eeaa07ce0
16+
refs/heads/auto: 344040d470262bef014f3db8d634f2cec4ddfed1
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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)