Skip to content

Commit 882bfa7

Browse files
committed
---
yaml --- r: 164664 b: refs/heads/auto c: 10a862d h: refs/heads/master v: v3
1 parent 9fddf0a commit 882bfa7

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: f0276072a3ee4596cacda9b2155ca57a07ec0683
13+
refs/heads/auto: 10a862d4f48a183dec5621d2cd81e64701bd29c6
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -451,8 +451,6 @@ fn encode_reexported_static_methods(ecx: &EncodeContext,
451451
mod_path: PathElems,
452452
exp: &middle::resolve::Export) {
453453
if let Some(ast_map::NodeItem(item)) = ecx.tcx.map.find(exp.def_id.node) {
454-
let original_name = token::get_ident(item.ident);
455-
456454
let path_differs = ecx.tcx.map.with_path(exp.def_id.node, |path| {
457455
let (mut a, mut b) = (path, mod_path.clone());
458456
loop {
@@ -474,16 +472,16 @@ fn encode_reexported_static_methods(ecx: &EncodeContext,
474472
// encoded metadata for static methods relative to Bar,
475473
// but not yet for Foo.
476474
//
477-
if path_differs || original_name.get() != exp.name {
475+
if path_differs || item.ident.name != exp.name {
478476
if !encode_reexported_static_base_methods(ecx, rbml_w, exp) {
479477
if encode_reexported_static_trait_methods(ecx, rbml_w, exp) {
480478
debug!("(encode reexported static methods) {} [trait]",
481-
original_name);
479+
item.ident.name);
482480
}
483481
}
484482
else {
485483
debug!("(encode reexported static methods) {} [base]",
486-
original_name);
484+
item.ident.name);
487485
}
488486
}
489487
}
@@ -534,7 +532,7 @@ fn encode_reexports(ecx: &EncodeContext,
534532
rbml_w.wr_str(def_to_string(exp.def_id).as_slice());
535533
rbml_w.end_tag();
536534
rbml_w.start_tag(tag_items_data_item_reexport_name);
537-
rbml_w.wr_str(exp.name.as_slice());
535+
rbml_w.wr_str(exp.name.as_str());
538536
rbml_w.end_tag();
539537
rbml_w.end_tag();
540538
encode_reexported_static_methods(ecx, rbml_w, path.clone(), exp);

branches/auto/src/librustc/middle/resolve.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ type BindingMap = HashMap<Name, BindingInfo>;
9898
pub type ExportMap = NodeMap<Vec<Export>>;
9999

100100
pub struct Export {
101-
pub name: String, // The name of the target.
101+
pub name: Name, // The name of the target.
102102
pub def_id: DefId, // The definition of the target.
103103
}
104104

@@ -3873,11 +3873,10 @@ impl<'a> Resolver<'a> {
38733873
ns: Namespace) {
38743874
match namebindings.def_for_namespace(ns) {
38753875
Some(d) => {
3876-
let name = token::get_name(name);
38773876
debug!("(computing exports) YES: export '{}' => {}",
38783877
name, d.def_id());
38793878
exports.push(Export {
3880-
name: name.get().to_string(),
3879+
name: name,
38813880
def_id: d.def_id()
38823881
});
38833882
}

0 commit comments

Comments
 (0)