Skip to content

Commit 82ae634

Browse files
committed
---
yaml --- r: 275851 b: refs/heads/auto c: b32d7b5 h: refs/heads/master i: 275849: d00e03a 275847: 77e24d4
1 parent c536a23 commit 82ae634

File tree

25 files changed

+146
-201
lines changed

25 files changed

+146
-201
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 923001ebb7980ec425e6df561575bccaf5f90240
11+
refs/heads/auto: b32d7b592306a2784585e842193db1546a2f9587
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/src/librustc/hir/fold.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use syntax::attr::ThinAttributesExt;
1818
use hir;
1919
use syntax::codemap::{respan, Span, Spanned};
2020
use syntax::ptr::P;
21-
use syntax::parse::token;
21+
use syntax::parse::token::keywords;
2222
use syntax::util::move_map::MoveMap;
2323

2424
pub trait Folder : Sized {
@@ -867,7 +867,7 @@ pub fn noop_fold_crate<T: Folder>(Crate { module, attrs, config, span,
867867
let config = folder.fold_meta_items(config);
868868

869869
let crate_mod = folder.fold_item(hir::Item {
870-
name: token::special_idents::Invalid.name,
870+
name: keywords::Invalid.name(),
871871
attrs: attrs,
872872
id: DUMMY_NODE_ID,
873873
vis: hir::Public,

branches/auto/src/librustc/hir/print.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ use syntax::abi::Abi;
1414
use syntax::ast;
1515
use syntax::codemap::{self, CodeMap, BytePos, Spanned};
1616
use syntax::errors;
17-
use syntax::parse::token::{self, BinOpToken};
17+
use syntax::parse::token::{self, keywords, BinOpToken};
1818
use syntax::parse::lexer::comments;
19-
use syntax::parse;
2019
use syntax::print::pp::{self, break_offset, word, space, hardbreak};
2120
use syntax::print::pp::{Breaks, eof};
2221
use syntax::print::pp::Breaks::{Consistent, Inconsistent};
@@ -2209,9 +2208,8 @@ impl<'a> State<'a> {
22092208
hir::TyInfer if is_closure => self.print_pat(&input.pat)?,
22102209
_ => {
22112210
match input.pat.node {
2212-
PatKind::Ident(_, ref path1, _) if
2213-
path1.node.name ==
2214-
parse::token::special_idents::Invalid.name => {
2211+
PatKind::Ident(_, ref path1, _)
2212+
if path1.node.name == keywords::Invalid.name() => {
22152213
// Do nothing.
22162214
}
22172215
_ => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
15781578
let var = self.variable(p_id, sp);
15791579
// Ignore unused self.
15801580
let name = path1.node;
1581-
if name != keywords::SelfValue.ident.name {
1581+
if name != keywords::SelfValue.name() {
15821582
if !self.warn_about_unused(sp, p_id, entry_ln, var) {
15831583
if self.live_on_entry(entry_ln, var).is_none() {
15841584
self.report_dead_assign(p_id, sp, var, true);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use std::fmt;
2929
use std::mem::replace;
3030
use syntax::ast;
3131
use syntax::codemap::Span;
32-
use syntax::parse::token::special_idents;
32+
use syntax::parse::token::keywords;
3333
use util::nodemap::NodeMap;
3434

3535
use hir;
@@ -245,7 +245,7 @@ impl<'a, 'v> Visitor<'v> for LifetimeContext<'a> {
245245
}
246246

247247
fn visit_lifetime(&mut self, lifetime_ref: &hir::Lifetime) {
248-
if lifetime_ref.name == special_idents::StaticLifetime.name {
248+
if lifetime_ref.name == keywords::StaticLifetime.name() {
249249
self.insert_lifetime(lifetime_ref, DefStaticRegion);
250250
return;
251251
}
@@ -673,7 +673,7 @@ impl<'a> LifetimeContext<'a> {
673673
let lifetime_i = &lifetimes[i];
674674

675675
for lifetime in lifetimes {
676-
if lifetime.lifetime.name == special_idents::StaticLifetime.name {
676+
if lifetime.lifetime.name == keywords::StaticLifetime.name() {
677677
span_err!(self.sess, lifetime.lifetime.span, E0262,
678678
"invalid lifetime parameter name: `{}`", lifetime.lifetime.name);
679679
}

branches/auto/src/librustc/mir/repr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ pub struct ArgDecl<'tcx> {
200200
/// and has to be collected from multiple actual arguments.
201201
pub spread: bool,
202202

203-
/// Either special_idents::invalid or the name of a single-binding
203+
/// Either keywords::Invalid or the name of a single-binding
204204
/// pattern associated with this argument. Useful for debuginfo.
205205
pub debug_name: Name
206206
}

branches/auto/src/librustc/ty/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ impl<'tcx> TyCtxt<'tcx> {
10691069
}
10701070

10711071
pub fn mk_self_type(&self) -> Ty<'tcx> {
1072-
self.mk_param(subst::SelfSpace, 0, keywords::SelfType.ident.name)
1072+
self.mk_param(subst::SelfSpace, 0, keywords::SelfType.name())
10731073
}
10741074

10751075
pub fn mk_param_from_def(&self, def: &ty::TypeParameterDef) -> Ty<'tcx> {

branches/auto/src/librustc/ty/sty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ impl ParamTy {
533533
}
534534

535535
pub fn for_self() -> ParamTy {
536-
ParamTy::new(subst::SelfSpace, 0, keywords::SelfType.ident.name)
536+
ParamTy::new(subst::SelfSpace, 0, keywords::SelfType.name())
537537
}
538538

539539
pub fn for_def(def: &ty::TypeParameterDef) -> ParamTy {

branches/auto/src/librustc_mir/build/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc::hir::pat_util::pat_is_binding;
1818
use std::ops::{Index, IndexMut};
1919
use syntax::ast;
2020
use syntax::codemap::Span;
21-
use syntax::parse::token;
21+
use syntax::parse::token::keywords;
2222

2323
pub struct Builder<'a, 'tcx: 'a> {
2424
hir: Cx<'a, 'tcx>,
@@ -238,7 +238,7 @@ pub fn construct<'a,'tcx>(hir: Cx<'a,'tcx>,
238238
ty::UpvarCapture::ByRef(..) => true
239239
});
240240
let mut decl = UpvarDecl {
241-
debug_name: token::special_idents::invalid.name,
241+
debug_name: keywords::Invalid.name(),
242242
by_ref: by_ref
243243
};
244244
if let Some(hir::map::NodeLocal(pat)) = tcx.map.find(fv.def.var_id()) {
@@ -296,7 +296,7 @@ impl<'a,'tcx> Builder<'a,'tcx> {
296296
self.schedule_drop(pattern.as_ref().map_or(ast_block.span, |pat| pat.span),
297297
argument_extent, &lvalue, ty);
298298

299-
let mut name = token::special_idents::invalid.name;
299+
let mut name = keywords::Invalid.name();
300300
if let Some(pat) = pattern {
301301
if let hir::PatKind::Ident(_, ref ident, _) = pat.node {
302302
if pat_is_binding(&self.hir.tcx().def_map.borrow(), pat) {

branches/auto/src/librustc_trans/mir/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use machine;
2222
use type_of;
2323

2424
use syntax::codemap::DUMMY_SP;
25-
use syntax::parse::token;
25+
use syntax::parse::token::keywords;
2626

2727
use std::ops::Deref;
2828
use std::rc::Rc;
@@ -286,7 +286,7 @@ fn arg_value_refs<'bcx, 'tcx>(bcx: &BlockAndBuilder<'bcx, 'tcx>,
286286
alloca: lltemp,
287287
address_operations: &ops
288288
};
289-
declare_local(bcx, token::special_idents::Invalid.name,
289+
declare_local(bcx, keywords::Invalid.name(),
290290
tupled_arg_ty, scope, variable_access,
291291
VariableKind::ArgumentVariable(arg_index + i + 1),
292292
bcx.fcx().span.unwrap_or(DUMMY_SP));

branches/auto/src/librustc_typeck/astconv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ use syntax::{abi, ast};
7373
use syntax::codemap::{Span, Pos};
7474
use syntax::errors::DiagnosticBuilder;
7575
use syntax::feature_gate::{GateIssue, emit_feature_err};
76-
use syntax::parse::token;
76+
use syntax::parse::token::{self, keywords};
7777

7878
use rustc::hir::print as pprust;
7979
use rustc::hir;
@@ -1313,7 +1313,7 @@ fn associated_path_def_to_ty<'tcx>(this: &AstConv<'tcx>,
13131313
let trait_node_id = tcx.map.as_local_node_id(trait_did).unwrap();
13141314
match find_bound_for_assoc_item(this,
13151315
trait_node_id,
1316-
token::keywords::SelfType.ident.name,
1316+
keywords::SelfType.name(),
13171317
assoc_name,
13181318
span) {
13191319
Ok(bound) => bound,

branches/auto/src/librustc_typeck/check/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ use syntax::attr;
120120
use syntax::attr::AttrMetaMethods;
121121
use syntax::codemap::{self, Span, Spanned};
122122
use syntax::errors::DiagnosticBuilder;
123-
use syntax::parse::token::{self, InternedString, special_idents};
123+
use syntax::parse::token::{self, InternedString, keywords};
124124
use syntax::ptr::P;
125125
use syntax::util::lev_distance::find_best_match_for_name;
126126

@@ -2851,7 +2851,7 @@ fn check_expr_with_expectation_and_lvalue_pref<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
28512851
method_ty
28522852
}
28532853
Err(error) => {
2854-
if method_name.node != special_idents::Invalid.name {
2854+
if method_name.node != keywords::Invalid.name() {
28552855
method::report_error(fcx, method_name.span, expr_t,
28562856
method_name.node, Some(rcvr), error);
28572857
}
@@ -2990,7 +2990,7 @@ fn check_expr_with_expectation_and_lvalue_pref<'a, 'tcx>(fcx: &FnCtxt<'a, 'tcx>,
29902990
let msg = format!("field `{}` of struct `{}` is private", field.node, struct_path);
29912991
fcx.tcx().sess.span_err(expr.span, &msg);
29922992
fcx.write_ty(expr.id, field_ty);
2993-
} else if field.node == special_idents::Invalid.name {
2993+
} else if field.node == keywords::Invalid.name() {
29942994
fcx.write_error(expr.id);
29952995
} else if method::exists(fcx, field.span, field.node, expr_t, expr.id) {
29962996
fcx.type_error_struct(field.span,
@@ -3780,7 +3780,7 @@ pub fn resolve_ty_and_def_ufcs<'a, 'b, 'tcx>(fcx: &FnCtxt<'b, 'tcx>,
37803780
method::MethodError::PrivateMatch(def) => Some(def),
37813781
_ => None,
37823782
};
3783-
if item_name != special_idents::Invalid.name {
3783+
if item_name != keywords::Invalid.name() {
37843784
method::report_error(fcx, span, ty, item_name, None, error);
37853785
}
37863786
def

branches/auto/src/librustc_typeck/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ impl<'ccx, 'tcx> CheckTypeWellFormedVisitor<'ccx, 'tcx> {
472472
{
473473
let name = match space {
474474
TypeSpace => ast_generics.ty_params[index].name,
475-
SelfSpace => keywords::SelfType.ident.name,
475+
SelfSpace => keywords::SelfType.name(),
476476
FnSpace => bug!("Fn space occupied?"),
477477
};
478478

branches/auto/src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ fn ty_generics_for_trait<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
16551655
let def = ty::TypeParameterDef {
16561656
space: SelfSpace,
16571657
index: 0,
1658-
name: keywords::SelfType.ident.name,
1658+
name: keywords::SelfType.name(),
16591659
def_id: ccx.tcx.map.local_def_id(param_id),
16601660
default_def_id: ccx.tcx.map.local_def_id(parent),
16611661
default: None,

branches/auto/src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,7 @@ fn resolve_type(cx: &DocContext,
26662666
hir::TyFloat(ast::FloatTy::F64) => return Primitive(F64),
26672667
},
26682668
Def::SelfTy(..) if path.segments.len() == 1 => {
2669-
return Generic(keywords::SelfType.ident.to_string());
2669+
return Generic(keywords::SelfType.name().to_string());
26702670
}
26712671
Def::SelfTy(..) | Def::TyParam(..) => true,
26722672
_ => false,

branches/auto/src/libsyntax/ext/build.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ use ast::{self, Ident, Generics, Expr, BlockCheckMode, UnOp, PatKind};
1313
use attr;
1414
use codemap::{Span, respan, Spanned, DUMMY_SP, Pos};
1515
use ext::base::ExtCtxt;
16-
use parse::token::{keywords, special_idents};
17-
use parse::token::InternedString;
18-
use parse::token;
16+
use parse::token::{self, keywords, InternedString};
1917
use ptr::P;
2018

2119
// Transitional reexports so qquote can find the paths it is looking for
@@ -602,7 +600,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
602600
self.expr_path(self.path_ident(span, id))
603601
}
604602
fn expr_self(&self, span: Span) -> P<ast::Expr> {
605-
self.expr_ident(span, keywords::SelfValue.ident)
603+
self.expr_ident(span, keywords::SelfValue.ident())
606604
}
607605

608606
fn expr_binary(&self, sp: Span, op: ast::BinOpKind,
@@ -1132,7 +1130,7 @@ impl<'a> AstBuilder for ExtCtxt<'a> {
11321130
vis: ast::Visibility, vp: P<ast::ViewPath>) -> P<ast::Item> {
11331131
P(ast::Item {
11341132
id: ast::DUMMY_NODE_ID,
1135-
ident: special_idents::Invalid,
1133+
ident: keywords::Invalid.ident(),
11361134
attrs: vec![],
11371135
node: ast::ItemKind::Use(vp),
11381136
vis: vis,

branches/auto/src/libsyntax/ext/expand.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use fold;
2525
use fold::*;
2626
use util::move_map::MoveMap;
2727
use parse;
28-
use parse::token::{fresh_mark, fresh_name, intern};
28+
use parse::token::{fresh_mark, fresh_name, intern, keywords};
2929
use ptr::P;
3030
use util::small_vector::SmallVector;
3131
use visit;
@@ -380,7 +380,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
380380

381381
Some(rc) => match *rc {
382382
NormalTT(ref expander, tt_span, allow_internal_unstable) => {
383-
if ident.name != parse::token::special_idents::Invalid.name {
383+
if ident.name != keywords::Invalid.name() {
384384
fld.cx
385385
.span_err(path_span,
386386
&format!("macro {}! expects no ident argument, given '{}'",
@@ -401,7 +401,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
401401
expander.expand(fld.cx, span, &marked_before[..])
402402
}
403403
IdentTT(ref expander, tt_span, allow_internal_unstable) => {
404-
if ident.name == parse::token::special_idents::Invalid.name {
404+
if ident.name == keywords::Invalid.name() {
405405
fld.cx.span_err(path_span,
406406
&format!("macro {}! expects an ident argument",
407407
extname));
@@ -420,7 +420,7 @@ pub fn expand_item_mac(it: P<ast::Item>,
420420
expander.expand(fld.cx, span, ident, marked_tts)
421421
}
422422
MacroRulesTT => {
423-
if ident.name == parse::token::special_idents::Invalid.name {
423+
if ident.name == keywords::Invalid.name() {
424424
fld.cx.span_err(path_span, "macro_rules! expects an ident argument");
425425
return SmallVector::zero();
426426
}
@@ -893,7 +893,7 @@ fn expand_annotatable(a: Annotatable,
893893
}
894894
ast::ItemKind::Mod(_) | ast::ItemKind::ForeignMod(_) => {
895895
let valid_ident =
896-
it.ident.name != parse::token::special_idents::Invalid.name;
896+
it.ident.name != keywords::Invalid.name();
897897

898898
if valid_ident {
899899
fld.cx.mod_push(it.ident);
@@ -1807,7 +1807,7 @@ mod tests {
18071807

18081808
// run one of the renaming tests
18091809
fn run_renaming_test(t: &RenamingTest, test_idx: usize) {
1810-
let invalid_name = token::special_idents::Invalid.name;
1810+
let invalid_name = keywords::Invalid.name();
18111811
let (teststr, bound_connections, bound_ident_check) = match *t {
18121812
(ref str,ref conns, bic) => (str.to_string(), conns.clone(), bic)
18131813
};

branches/auto/src/libsyntax/fold.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use ast::*;
2222
use ast;
2323
use attr::{ThinAttributes, ThinAttributesExt};
2424
use codemap::{respan, Span, Spanned};
25-
use parse::token;
25+
use parse::token::{self, keywords};
2626
use ptr::P;
2727
use util::small_vector::SmallVector;
2828
use util::move_map::MoveMap;
@@ -1015,7 +1015,7 @@ pub fn noop_fold_crate<T: Folder>(Crate {module, attrs, config, mut exported_mac
10151015
let config = folder.fold_meta_items(config);
10161016

10171017
let mut items = folder.fold_item(P(ast::Item {
1018-
ident: token::special_idents::Invalid,
1018+
ident: keywords::Invalid.ident(),
10191019
attrs: attrs,
10201020
id: ast::DUMMY_NODE_ID,
10211021
vis: ast::Visibility::Public,

0 commit comments

Comments
 (0)