Skip to content

Commit 6a02a21

Browse files
committed
---
yaml --- r: 79359 b: refs/heads/try c: 16cf295 h: refs/heads/master i: 79357: f949837 79355: 79f7581 79351: 5c8c929 79343: e3e4e46 79327: b551c56 79295: 2b229c9 79231: 4054729 79103: 7c1b678 78847: 80c9de6 v: v3
1 parent 80a83e3 commit 6a02a21

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e6de6b7da8ee88bf84b0e217900051334be08da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 9c1689d38ccccc44f40b1a09c698df8760c9d30b
5+
refs/heads/try: 16cf2959cefd2fa6764a11c9dc6106c1839fa6ab
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ impl BorrowckCtxt {
788788
match fname {
789789
mc::NamedField(ref fname) => {
790790
out.push_char('.');
791-
out.push_str(token::ident_to_str(fname));
791+
out.push_str(token::interner_get(*fname));
792792
}
793793
mc::PositionalField(idx) => {
794794
out.push_char('#'); // invent a notation here

branches/try/src/librustc/middle/entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn find_entry_point(session: Session, crate: &Crate, ast_map: ast_map::map)
8181
fn find_item(item: @item, ctxt: @mut EntryContext, visitor: &mut EntryVisitor) {
8282
match item.node {
8383
item_fn(*) => {
84-
if item.ident == special_idents::main {
84+
if item.ident.name == special_idents::main.name {
8585
match ctxt.ast_map.find(&item.id) {
8686
Some(&ast_map::node_item(_, path)) => {
8787
if path.len() == 0 {

branches/try/src/librustc/middle/mem_categorization.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ use syntax::ast::{MutImmutable, MutMutable};
5656
use syntax::ast;
5757
use syntax::codemap::Span;
5858
use syntax::print::pprust;
59+
use syntax::parse::token;
5960

6061
#[deriving(Eq)]
6162
pub enum categorization {
@@ -99,7 +100,7 @@ pub enum InteriorKind {
99100

100101
#[deriving(Eq, IterBytes)]
101102
pub enum FieldName {
102-
NamedField(ast::Ident),
103+
NamedField(ast::Name),
103104
PositionalField(uint)
104105
}
105106

@@ -619,7 +620,7 @@ impl mem_categorization_ctxt {
619620
@cmt_ {
620621
id: node.id(),
621622
span: node.span(),
622-
cat: cat_interior(base_cmt, InteriorField(NamedField(f_name))),
623+
cat: cat_interior(base_cmt, InteriorField(NamedField(f_name.name))),
623624
mutbl: base_cmt.mutbl.inherit(),
624625
ty: f_ty
625626
}
@@ -1224,9 +1225,9 @@ pub fn ptr_sigil(ptr: PointerKind) -> ~str {
12241225
}
12251226
12261227
impl Repr for InteriorKind {
1227-
fn repr(&self, tcx: ty::ctxt) -> ~str {
1228+
fn repr(&self, _tcx: ty::ctxt) -> ~str {
12281229
match *self {
1229-
InteriorField(NamedField(fld)) => tcx.sess.str_of(fld).to_owned(),
1230+
InteriorField(NamedField(fld)) => token::interner_get(fld).to_owned(),
12301231
InteriorField(PositionalField(i)) => fmt!("#%?", i),
12311232
InteriorElement(_) => ~"[]",
12321233
}

branches/try/src/librustc/middle/moves.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl VisitContext {
429429
// specified and (2) have a type that
430430
// moves-by-default:
431431
let consume_with = with_fields.iter().any(|tf| {
432-
!fields.iter().any(|f| f.ident == tf.ident) &&
432+
!fields.iter().any(|f| f.ident.name == tf.ident.name) &&
433433
ty::type_moves_by_default(self.tcx, tf.mt.ty)
434434
});
435435

branches/try/src/librustc/middle/privacy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl PrivacyVisitor {
206206
fn check_field(&mut self, span: Span, id: ast::DefId, ident: ast::Ident) {
207207
let fields = ty::lookup_struct_fields(self.tcx, id);
208208
for field in fields.iter() {
209-
if field.ident != ident { loop; }
209+
if field.ident.name != ident.name { loop; }
210210
if field.vis == private {
211211
self.tcx.sess.span_err(span, fmt!("field `%s` is private",
212212
token::ident_to_str(&ident)));

0 commit comments

Comments
 (0)