Skip to content

Commit 9a222cd

Browse files
committed
---
yaml --- r: 83647 b: refs/heads/try c: abe648d h: refs/heads/master i: 83645: ef9bac9 83643: 0c6365b 83639: 0625c41 83631: 955fc06 83615: 946f4df 83583: fa2e89f v: v3
1 parent fd6d2b9 commit 9a222cd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+97
-319
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: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: 4dc3ff9c80bab9da65f3a8323882ec082a80bbeb
5+
refs/heads/try: abe648d60854c7dbbc0c9db5f29111268c66961d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libextra/base64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl<'self> FromBase64 for &'self str {
200200
'0'..'9' => buf |= val + 0x04,
201201
'+'|'-' => buf |= 0x3E,
202202
'/'|'_' => buf |= 0x3F,
203-
'\r'|'\n' => continue,
203+
'\r'|'\n' => loop,
204204
'=' => break,
205205
_ => return Err(format!("Invalid character '{}' at position {}",
206206
self.char_at(idx), idx))

branches/try/src/libextra/fileinput.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl io::Reader for FileInput {
303303
let b = r.read_byte();
304304

305305
if b < 0 {
306-
continue;
306+
loop;
307307
}
308308

309309
if b == '\n' as int {

branches/try/src/libextra/glob.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl Pattern {
211211
let cs = parse_char_specifiers(chars.slice(i + 2, i + 3 + j));
212212
tokens.push(AnyExcept(cs));
213213
i += j + 4;
214-
continue;
214+
loop;
215215
}
216216
}
217217
}
@@ -222,7 +222,7 @@ impl Pattern {
222222
let cs = parse_char_specifiers(chars.slice(i + 1, i + 2 + j));
223223
tokens.push(AnyWithin(cs));
224224
i += j + 3;
225-
continue;
225+
loop;
226226
}
227227
}
228228
}

branches/try/src/libextra/hex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl<'self> FromHex for &'self str {
100100
'0'..'9' => buf |= byte - ('0' as u8),
101101
' '|'\r'|'\n'|'\t' => {
102102
buf >>= 4;
103-
continue
103+
loop
104104
}
105105
_ => return Err(format!("Invalid character '{}' at position {}",
106106
self.char_at(idx), idx))

branches/try/src/libextra/num/bigint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ impl Integer for BigUint {
413413
}
414414
if d0.is_zero() {
415415
n = 2;
416-
continue;
416+
loop;
417417
}
418418
n = 1;
419419
// FIXME(#6102): Assignment operator for BigInt causes ICE

branches/try/src/libextra/priority_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl<T:Ord> PriorityQueue<T> {
140140
let x = replace(&mut self.data[parent], init());
141141
move_val_init(&mut self.data[pos], x);
142142
pos = parent;
143-
continue
143+
loop
144144
}
145145
break
146146
}

branches/try/src/libextra/terminfo/parser/compiled.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
276276
for (i, v) in string_offsets.iter().enumerate() {
277277
let offset = *v;
278278
if offset == 0xFFFF { // non-entry
279-
continue;
279+
loop;
280280
}
281281

282282
let name = if snames[i] == "_" {
@@ -289,7 +289,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
289289
// undocumented: FFFE indicates cap@, which means the capability is not present
290290
// unsure if the handling for this is correct
291291
string_map.insert(name.to_owned(), ~[]);
292-
continue;
292+
loop;
293293
}
294294

295295

branches/try/src/libextra/url.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,12 +359,12 @@ pub fn query_to_str(query: &Query) -> ~str {
359359
pub fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> {
360360
for (i,c) in rawurl.iter().enumerate() {
361361
match c {
362-
'A' .. 'Z' | 'a' .. 'z' => continue,
362+
'A' .. 'Z' | 'a' .. 'z' => loop,
363363
'0' .. '9' | '+' | '-' | '.' => {
364364
if i == 0 {
365365
return Err(~"url: Scheme must begin with a letter.");
366366
}
367-
continue;
367+
loop;
368368
}
369369
':' => {
370370
if i == 0 {
@@ -420,7 +420,7 @@ fn get_authority(rawurl: &str) ->
420420
let mut end = len;
421421

422422
for (i,c) in rawurl.iter().enumerate() {
423-
if i < 2 { continue; } // ignore the leading //
423+
if i < 2 { loop; } // ignore the leading //
424424

425425
// deal with input class first
426426
match c {
@@ -558,7 +558,7 @@ fn get_path(rawurl: &str, authority: bool) ->
558558
'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '&' |'\'' | '(' | ')' | '.'
559559
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
560560
| '_' | '-' => {
561-
continue;
561+
loop;
562562
}
563563
'?' | '#' => {
564564
end = i;

branches/try/src/librust/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ pub fn main() {
247247
os::set_exit_status(exit_code);
248248
return;
249249
}
250-
_ => {}
250+
_ => loop
251251
}
252252
}
253253
}

branches/try/src/librustc/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ pub fn link_args(sess: Session,
10041004
for cratepath in r.iter() {
10051005
if cratepath.filetype() == Some(".rlib") {
10061006
args.push(cratepath.to_str());
1007-
continue;
1007+
loop;
10081008
}
10091009
let dir = cratepath.dirname();
10101010
if dir != ~"" { args.push(~"-L" + dir); }

branches/try/src/librustc/lib/llvm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// LLVM wrappers are intended to be called from trans,
1212
// which already runs in a #[fixed_stack_segment]
1313
#[allow(cstack)];
14-
#[allow(non_uppercase_pattern_statics)];
1514

1615
use std::c_str::ToCStr;
1716
use std::hashmap::HashMap;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ impl<'self> CheckLoanCtxt<'self> {
263263
debug2!("illegal_if={:?}", illegal_if);
264264

265265
for restr in loan1.restrictions.iter() {
266-
if !restr.set.intersects(illegal_if) { continue; }
267-
if restr.loan_path != loan2.loan_path { continue; }
266+
if !restr.set.intersects(illegal_if) { loop; }
267+
if restr.loan_path != loan2.loan_path { loop; }
268268

269269
match (new_loan.mutbl, old_loan.mutbl) {
270270
(MutableMutability, MutableMutability) => {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ pub fn check_arms(cx: &MatchCheckCtxt, arms: &[Arm]) {
133133
_ => false
134134
}
135135
};
136-
137136
do walk_pat(*pat) |p| {
138137
if pat_matches_nan(p) {
139138
cx.tcx.sess.span_warn(p.span, "unmatchable NaN in pattern, \

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

Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ pub enum lint {
8383
unrecognized_lint,
8484
non_camel_case_types,
8585
non_uppercase_statics,
86-
non_uppercase_pattern_statics,
8786
type_limits,
8887
unused_unsafe,
8988

@@ -210,13 +209,6 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
210209
default: allow
211210
}),
212211

213-
("non_uppercase_pattern_statics",
214-
LintSpec {
215-
lint: non_uppercase_pattern_statics,
216-
desc: "static constants in match patterns should be all caps",
217-
default: warn
218-
}),
219-
220212
("managed_heap_memory",
221213
LintSpec {
222214
lint: managed_heap_memory,
@@ -621,7 +613,7 @@ pub fn each_lint(sess: session::Session,
621613
ast::MetaList(_, ref metas) => metas,
622614
_ => {
623615
sess.span_err(meta.span, "malformed lint attribute");
624-
continue;
616+
loop;
625617
}
626618
};
627619
for meta in metas.iter() {
@@ -1118,22 +1110,6 @@ fn check_item_non_uppercase_statics(cx: &Context, it: &ast::item) {
11181110
}
11191111
}
11201112

1121-
fn check_pat_non_uppercase_statics(cx: &Context, p: &ast::Pat) {
1122-
// Lint for constants that look like binding identifiers (#7526)
1123-
match (&p.node, cx.tcx.def_map.find(&p.id)) {
1124-
(&ast::PatIdent(_, ref path, _), Some(&ast::DefStatic(_, false))) => {
1125-
// last identifier alone is right choice for this lint.
1126-
let ident = path.segments.last().identifier;
1127-
let s = cx.tcx.sess.str_of(ident);
1128-
if s.iter().any(|c| c.is_lowercase()) {
1129-
cx.span_lint(non_uppercase_pattern_statics, path.span,
1130-
"static constant in pattern should be all caps");
1131-
}
1132-
}
1133-
_ => {}
1134-
}
1135-
}
1136-
11371113
struct UnusedUnsafeLintVisitor { stopping_on_items: bool }
11381114

11391115
impl SubitemStoppableVisitor for UnusedUnsafeLintVisitor {
@@ -1540,11 +1516,6 @@ struct LintCheckVisitor;
15401516

15411517
impl Visitor<@mut Context> for LintCheckVisitor {
15421518

1543-
fn visit_pat(&mut self, p:@ast::Pat, cx: @mut Context) {
1544-
check_pat_non_uppercase_statics(cx, p);
1545-
visit::walk_pat(self, p, cx);
1546-
}
1547-
15481519
fn visit_item(&mut self, it:@ast::item, cx: @mut Context) {
15491520

15501521
do cx.with_lint_attrs(it.attrs) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ impl PrivacyVisitor {
225225
fn check_field(&mut self, span: Span, id: ast::DefId, ident: ast::Ident) {
226226
let fields = ty::lookup_struct_fields(self.tcx, id);
227227
for field in fields.iter() {
228-
if field.name != ident.name { continue; }
228+
if field.name != ident.name { loop; }
229229
if field.vis == private {
230230
self.tcx.sess.span_err(span, format!("field `{}` is private",
231231
token::ident_to_str(&ident)));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ impl ReachableContext {
359359
while self.worklist.len() > 0 {
360360
let search_item = self.worklist.pop();
361361
if scanned.contains(&search_item) {
362-
continue
362+
loop
363363
}
364364
scanned.insert(search_item);
365365
self.reachable_symbols.insert(search_item);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3333,7 +3333,7 @@ impl Resolver {
33333333
if importresolution.privacy != Public {
33343334
debug2!("(computing exports) not reexporting private `{}`",
33353335
interner_get(*name));
3336-
continue;
3336+
loop;
33373337
}
33383338
let xs = [TypeNS, ValueNS];
33393339
for ns in xs.iter() {

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ pub fn new_fn_ctxt_w_id(ccx: @mut CrateContext,
17331733
fcx.alloca_insert_pt = Some(llvm::LLVMGetFirstInstruction(entry_bcx.llbb));
17341734
}
17351735

1736-
if !ty::type_is_voidish(substd_output_type) {
1736+
if !ty::type_is_voidish(ccx.tcx, substd_output_type) {
17371737
// If the function returns nil/bot, there is no real return
17381738
// value, so do not set `llretptr`.
17391739
if !skip_retptr || uses_outptr {
@@ -1964,7 +1964,7 @@ pub fn trans_closure(ccx: @mut CrateContext,
19641964
// translation calls that don't have a return value (trans_crate,
19651965
// trans_mod, trans_item, et cetera) and those that do
19661966
// (trans_block, trans_expr, et cetera).
1967-
if body.expr.is_none() || ty::type_is_voidish(block_ty) {
1967+
if body.expr.is_none() || ty::type_is_voidish(bcx.tcx(), block_ty) {
19681968
bcx = controlflow::trans_block(bcx, body, expr::Ignore);
19691969
} else {
19701970
let dest = expr::SaveIn(fcx.llretptr.unwrap());

branches/try/src/librustc/middle/trans/cabi_arm.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[allow(non_uppercase_pattern_statics)];
12-
1311
use lib::llvm::{llvm, Integer, Pointer, Float, Double, Struct, Array};
1412
use lib::llvm::{Attribute, StructRetAttribute};
1513
use middle::trans::cabi::{FnType, LLVMType};

branches/try/src/librustc/middle/trans/cabi_mips.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#[allow(non_uppercase_pattern_statics)];
1211

1312
use std::libc::c_uint;
1413
use std::num;

branches/try/src/librustc/middle/trans/cabi_x86_64.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// The classification code for the x86_64 ABI is taken from the clay language
1212
// https://github.com/jckarter/clay/blob/master/compiler/src/externals.cpp
1313

14-
#[allow(non_uppercase_pattern_statics)];
15-
1614
use lib::llvm::{llvm, Integer, Pointer, Float, Double};
1715
use lib::llvm::{Struct, Array, Attribute};
1816
use lib::llvm::{StructRetAttribute, ByValAttribute};
@@ -319,7 +317,7 @@ fn llreg_ty(cls: &[RegClass]) -> Type {
319317
let vec_ty = Type::vector(&Type::f32(), (vec_len * 2u) as u64);
320318
tys.push(vec_ty);
321319
i += vec_len;
322-
continue;
320+
loop;
323321
}
324322
SSEFs => {
325323
tys.push(Type::f32());

branches/try/src/librustc/middle/trans/callee.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ pub fn trans_call_inner(in_cx: @mut Block,
660660
}
661661
Some(expr::SaveIn(dst)) => Some(dst),
662662
Some(expr::Ignore) => {
663-
if !ty::type_is_voidish(ret_ty) {
663+
if !ty::type_is_voidish(in_cx.tcx(), ret_ty) {
664664
Some(alloc_ty(bcx, ret_ty, "__llret"))
665665
} else {
666666
unsafe {
@@ -735,7 +735,7 @@ pub fn trans_call_inner(in_cx: @mut Block,
735735
match opt_llretslot {
736736
Some(llretslot) => {
737737
if !type_of::return_uses_outptr(bcx.ccx(), ret_ty) &&
738-
!ty::type_is_voidish(ret_ty)
738+
!ty::type_is_voidish(bcx.tcx(), ret_ty)
739739
{
740740
Store(bcx, llret, llretslot);
741741
}

branches/try/src/librustc/middle/trans/datum.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub fn appropriate_mode(ccx: &mut CrateContext, ty: ty::t) -> DatumMode {
195195
* on whether type is immediate or not.
196196
*/
197197

198-
if ty::type_is_voidish(ty) {
198+
if ty::type_is_voidish(ccx.tcx, ty) {
199199
ByValue
200200
} else if type_is_immediate(ccx, ty) {
201201
ByValue
@@ -271,7 +271,7 @@ impl Datum {
271271

272272
let _icx = push_ctxt("copy_to");
273273

274-
if ty::type_is_voidish(self.ty) {
274+
if ty::type_is_voidish(bcx.tcx(), self.ty) {
275275
return bcx;
276276
}
277277

@@ -343,7 +343,7 @@ impl Datum {
343343
debug2!("move_to(self={}, action={:?}, dst={})",
344344
self.to_str(bcx.ccx()), action, bcx.val_to_str(dst));
345345

346-
if ty::type_is_voidish(self.ty) {
346+
if ty::type_is_voidish(bcx.tcx(), self.ty) {
347347
return bcx;
348348
}
349349

@@ -432,7 +432,7 @@ impl Datum {
432432
*
433433
* Yields the value itself. */
434434

435-
if ty::type_is_voidish(self.ty) {
435+
if ty::type_is_voidish(bcx.tcx(), self.ty) {
436436
C_nil()
437437
} else {
438438
match self.mode {
@@ -469,7 +469,7 @@ impl Datum {
469469
match self.mode {
470470
ByRef(_) => self.val,
471471
ByValue => {
472-
if ty::type_is_voidish(self.ty) {
472+
if ty::type_is_voidish(bcx.tcx(), self.ty) {
473473
C_null(type_of::type_of(bcx.ccx(), self.ty).ptr_to())
474474
} else {
475475
let slot = alloc_ty(bcx, self.ty, "");

branches/try/src/librustc/middle/trans/expr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ pub fn trans_into(bcx: @mut Block, expr: &ast::Expr, dest: Dest) -> @mut Block {
440440
debuginfo::set_source_location(bcx.fcx, expr.id, expr.span);
441441

442442
let dest = {
443-
if ty::type_is_voidish(ty) {
443+
if ty::type_is_voidish(bcx.tcx(), ty) {
444444
Ignore
445445
} else {
446446
dest
@@ -531,7 +531,7 @@ fn trans_to_datum_unadjusted(bcx: @mut Block, expr: &ast::Expr) -> DatumBlock {
531531

532532
ty::RvalueDpsExpr => {
533533
let ty = expr_ty(bcx, expr);
534-
if ty::type_is_voidish(ty) {
534+
if ty::type_is_voidish(bcx.tcx(), ty) {
535535
bcx = trans_rvalue_dps_unadjusted(bcx, expr, Ignore);
536536
return nil(bcx, ty);
537537
} else {

0 commit comments

Comments
 (0)