mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
parent
4af849bc12
commit
4f67dcb24a
@ -200,7 +200,7 @@ impl<'self> FromBase64 for &'self str {
|
|||||||
'0'..'9' => buf |= val + 0x04,
|
'0'..'9' => buf |= val + 0x04,
|
||||||
'+'|'-' => buf |= 0x3E,
|
'+'|'-' => buf |= 0x3E,
|
||||||
'/'|'_' => buf |= 0x3F,
|
'/'|'_' => buf |= 0x3F,
|
||||||
'\r'|'\n' => loop,
|
'\r'|'\n' => continue,
|
||||||
'=' => break,
|
'=' => break,
|
||||||
_ => return Err(format!("Invalid character '{}' at position {}",
|
_ => return Err(format!("Invalid character '{}' at position {}",
|
||||||
self.char_at(idx), idx))
|
self.char_at(idx), idx))
|
||||||
|
@ -303,7 +303,7 @@ impl io::Reader for FileInput {
|
|||||||
let b = r.read_byte();
|
let b = r.read_byte();
|
||||||
|
|
||||||
if b < 0 {
|
if b < 0 {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if b == '\n' as int {
|
if b == '\n' as int {
|
||||||
|
@ -211,7 +211,7 @@ impl Pattern {
|
|||||||
let cs = parse_char_specifiers(chars.slice(i + 2, i + 3 + j));
|
let cs = parse_char_specifiers(chars.slice(i + 2, i + 3 + j));
|
||||||
tokens.push(AnyExcept(cs));
|
tokens.push(AnyExcept(cs));
|
||||||
i += j + 4;
|
i += j + 4;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,7 +222,7 @@ impl Pattern {
|
|||||||
let cs = parse_char_specifiers(chars.slice(i + 1, i + 2 + j));
|
let cs = parse_char_specifiers(chars.slice(i + 1, i + 2 + j));
|
||||||
tokens.push(AnyWithin(cs));
|
tokens.push(AnyWithin(cs));
|
||||||
i += j + 3;
|
i += j + 3;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ impl<'self> FromHex for &'self str {
|
|||||||
'0'..'9' => buf |= byte - ('0' as u8),
|
'0'..'9' => buf |= byte - ('0' as u8),
|
||||||
' '|'\r'|'\n'|'\t' => {
|
' '|'\r'|'\n'|'\t' => {
|
||||||
buf >>= 4;
|
buf >>= 4;
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
_ => return Err(format!("Invalid character '{}' at position {}",
|
_ => return Err(format!("Invalid character '{}' at position {}",
|
||||||
self.char_at(idx), idx))
|
self.char_at(idx), idx))
|
||||||
|
@ -413,7 +413,7 @@ impl Integer for BigUint {
|
|||||||
}
|
}
|
||||||
if d0.is_zero() {
|
if d0.is_zero() {
|
||||||
n = 2;
|
n = 2;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
n = 1;
|
n = 1;
|
||||||
// FIXME(#6102): Assignment operator for BigInt causes ICE
|
// FIXME(#6102): Assignment operator for BigInt causes ICE
|
||||||
|
@ -140,7 +140,7 @@ impl<T:Ord> PriorityQueue<T> {
|
|||||||
let x = replace(&mut self.data[parent], init());
|
let x = replace(&mut self.data[parent], init());
|
||||||
move_val_init(&mut self.data[pos], x);
|
move_val_init(&mut self.data[pos], x);
|
||||||
pos = parent;
|
pos = parent;
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
|
|||||||
for (i, v) in string_offsets.iter().enumerate() {
|
for (i, v) in string_offsets.iter().enumerate() {
|
||||||
let offset = *v;
|
let offset = *v;
|
||||||
if offset == 0xFFFF { // non-entry
|
if offset == 0xFFFF { // non-entry
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let name = if snames[i] == "_" {
|
let name = if snames[i] == "_" {
|
||||||
@ -289,7 +289,7 @@ pub fn parse(file: @Reader, longnames: bool) -> Result<~TermInfo, ~str> {
|
|||||||
// undocumented: FFFE indicates cap@, which means the capability is not present
|
// undocumented: FFFE indicates cap@, which means the capability is not present
|
||||||
// unsure if the handling for this is correct
|
// unsure if the handling for this is correct
|
||||||
string_map.insert(name.to_owned(), ~[]);
|
string_map.insert(name.to_owned(), ~[]);
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -359,12 +359,12 @@ pub fn query_to_str(query: &Query) -> ~str {
|
|||||||
pub fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> {
|
pub fn get_scheme(rawurl: &str) -> Result<(~str, ~str), ~str> {
|
||||||
for (i,c) in rawurl.iter().enumerate() {
|
for (i,c) in rawurl.iter().enumerate() {
|
||||||
match c {
|
match c {
|
||||||
'A' .. 'Z' | 'a' .. 'z' => loop,
|
'A' .. 'Z' | 'a' .. 'z' => continue,
|
||||||
'0' .. '9' | '+' | '-' | '.' => {
|
'0' .. '9' | '+' | '-' | '.' => {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
return Err(~"url: Scheme must begin with a letter.");
|
return Err(~"url: Scheme must begin with a letter.");
|
||||||
}
|
}
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
':' => {
|
':' => {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
@ -420,7 +420,7 @@ fn get_authority(rawurl: &str) ->
|
|||||||
let mut end = len;
|
let mut end = len;
|
||||||
|
|
||||||
for (i,c) in rawurl.iter().enumerate() {
|
for (i,c) in rawurl.iter().enumerate() {
|
||||||
if i < 2 { loop; } // ignore the leading //
|
if i < 2 { continue; } // ignore the leading //
|
||||||
|
|
||||||
// deal with input class first
|
// deal with input class first
|
||||||
match c {
|
match c {
|
||||||
@ -558,7 +558,7 @@ fn get_path(rawurl: &str, authority: bool) ->
|
|||||||
'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '&' |'\'' | '(' | ')' | '.'
|
'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '&' |'\'' | '(' | ')' | '.'
|
||||||
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
|
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
|
||||||
| '_' | '-' => {
|
| '_' | '-' => {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
'?' | '#' => {
|
'?' | '#' => {
|
||||||
end = i;
|
end = i;
|
||||||
|
@ -247,7 +247,7 @@ pub fn main() {
|
|||||||
os::set_exit_status(exit_code);
|
os::set_exit_status(exit_code);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_ => loop
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1004,7 @@ pub fn link_args(sess: Session,
|
|||||||
for cratepath in r.iter() {
|
for cratepath in r.iter() {
|
||||||
if cratepath.filetype() == Some(".rlib") {
|
if cratepath.filetype() == Some(".rlib") {
|
||||||
args.push(cratepath.to_str());
|
args.push(cratepath.to_str());
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
let dir = cratepath.dirname();
|
let dir = cratepath.dirname();
|
||||||
if dir != ~"" { args.push(~"-L" + dir); }
|
if dir != ~"" { args.push(~"-L" + dir); }
|
||||||
|
@ -263,8 +263,8 @@ impl<'self> CheckLoanCtxt<'self> {
|
|||||||
debug2!("illegal_if={:?}", illegal_if);
|
debug2!("illegal_if={:?}", illegal_if);
|
||||||
|
|
||||||
for restr in loan1.restrictions.iter() {
|
for restr in loan1.restrictions.iter() {
|
||||||
if !restr.set.intersects(illegal_if) { loop; }
|
if !restr.set.intersects(illegal_if) { continue; }
|
||||||
if restr.loan_path != loan2.loan_path { loop; }
|
if restr.loan_path != loan2.loan_path { continue; }
|
||||||
|
|
||||||
match (new_loan.mutbl, old_loan.mutbl) {
|
match (new_loan.mutbl, old_loan.mutbl) {
|
||||||
(MutableMutability, MutableMutability) => {
|
(MutableMutability, MutableMutability) => {
|
||||||
|
@ -613,7 +613,7 @@ pub fn each_lint(sess: session::Session,
|
|||||||
ast::MetaList(_, ref metas) => metas,
|
ast::MetaList(_, ref metas) => metas,
|
||||||
_ => {
|
_ => {
|
||||||
sess.span_err(meta.span, "malformed lint attribute");
|
sess.span_err(meta.span, "malformed lint attribute");
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
for meta in metas.iter() {
|
for meta in metas.iter() {
|
||||||
|
@ -225,7 +225,7 @@ impl PrivacyVisitor {
|
|||||||
fn check_field(&mut self, span: Span, id: ast::DefId, ident: ast::Ident) {
|
fn check_field(&mut self, span: Span, id: ast::DefId, ident: ast::Ident) {
|
||||||
let fields = ty::lookup_struct_fields(self.tcx, id);
|
let fields = ty::lookup_struct_fields(self.tcx, id);
|
||||||
for field in fields.iter() {
|
for field in fields.iter() {
|
||||||
if field.name != ident.name { loop; }
|
if field.name != ident.name { continue; }
|
||||||
if field.vis == private {
|
if field.vis == private {
|
||||||
self.tcx.sess.span_err(span, format!("field `{}` is private",
|
self.tcx.sess.span_err(span, format!("field `{}` is private",
|
||||||
token::ident_to_str(&ident)));
|
token::ident_to_str(&ident)));
|
||||||
|
@ -359,7 +359,7 @@ impl ReachableContext {
|
|||||||
while self.worklist.len() > 0 {
|
while self.worklist.len() > 0 {
|
||||||
let search_item = self.worklist.pop();
|
let search_item = self.worklist.pop();
|
||||||
if scanned.contains(&search_item) {
|
if scanned.contains(&search_item) {
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
scanned.insert(search_item);
|
scanned.insert(search_item);
|
||||||
self.reachable_symbols.insert(search_item);
|
self.reachable_symbols.insert(search_item);
|
||||||
|
@ -3334,7 +3334,7 @@ impl Resolver {
|
|||||||
if importresolution.privacy != Public {
|
if importresolution.privacy != Public {
|
||||||
debug2!("(computing exports) not reexporting private `{}`",
|
debug2!("(computing exports) not reexporting private `{}`",
|
||||||
interner_get(*name));
|
interner_get(*name));
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
let xs = [TypeNS, ValueNS];
|
let xs = [TypeNS, ValueNS];
|
||||||
for ns in xs.iter() {
|
for ns in xs.iter() {
|
||||||
|
@ -317,7 +317,7 @@ fn llreg_ty(cls: &[RegClass]) -> Type {
|
|||||||
let vec_ty = Type::vector(&Type::f32(), (vec_len * 2u) as u64);
|
let vec_ty = Type::vector(&Type::f32(), (vec_len * 2u) as u64);
|
||||||
tys.push(vec_ty);
|
tys.push(vec_ty);
|
||||||
i += vec_len;
|
i += vec_len;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
SSEFs => {
|
SSEFs => {
|
||||||
tys.push(Type::f32());
|
tys.push(Type::f32());
|
||||||
|
@ -799,7 +799,7 @@ fn conv_builtin_bounds(tcx: ty::ctxt, ast_bounds: &Option<OptVec<ast::TyParamBou
|
|||||||
ast::DefTrait(trait_did) => {
|
ast::DefTrait(trait_did) => {
|
||||||
if ty::try_add_builtin_trait(tcx, trait_did,
|
if ty::try_add_builtin_trait(tcx, trait_did,
|
||||||
&mut builtin_bounds) {
|
&mut builtin_bounds) {
|
||||||
loop; // success
|
continue; // success
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => { }
|
_ => { }
|
||||||
|
@ -330,7 +330,7 @@ pub fn check_struct_pat_fields(pcx: &pat_ctxt,
|
|||||||
if !etc {
|
if !etc {
|
||||||
for (i, field) in class_fields.iter().enumerate() {
|
for (i, field) in class_fields.iter().enumerate() {
|
||||||
if found_fields.contains(&i) {
|
if found_fields.contains(&i) {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
tcx.sess.span_err(span,
|
tcx.sess.span_err(span,
|
||||||
format!("pattern does not mention field `{}`",
|
format!("pattern does not mention field `{}`",
|
||||||
|
@ -922,7 +922,7 @@ impl<'self> LookupContext<'self> {
|
|||||||
|
|
||||||
if skip {
|
if skip {
|
||||||
// There are more than one of these and we need only one
|
// There are more than one of these and we need only one
|
||||||
loop;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
merged.push(candidate_a.clone());
|
merged.push(candidate_a.clone());
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ fn search_for_vtable(vcx: &VtableContext,
|
|||||||
|
|
||||||
// First, ensure we haven't processed this impl yet.
|
// First, ensure we haven't processed this impl yet.
|
||||||
if impls_seen.contains(&im.did) {
|
if impls_seen.contains(&im.did) {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
impls_seen.insert(im.did);
|
impls_seen.insert(im.did);
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ fn search_for_vtable(vcx: &VtableContext,
|
|||||||
// get all the ty vars sorted out.
|
// get all the ty vars sorted out.
|
||||||
let r = ty::impl_trait_ref(tcx, im.did);
|
let r = ty::impl_trait_ref(tcx, im.did);
|
||||||
let of_trait_ref = r.expect("trait_ref missing on trait impl");
|
let of_trait_ref = r.expect("trait_ref missing on trait impl");
|
||||||
if of_trait_ref.def_id != trait_ref.def_id { loop; }
|
if of_trait_ref.def_id != trait_ref.def_id { continue; }
|
||||||
|
|
||||||
// At this point, we know that of_trait_ref is the same trait
|
// At this point, we know that of_trait_ref is the same trait
|
||||||
// as trait_ref, but possibly applied to different substs.
|
// as trait_ref, but possibly applied to different substs.
|
||||||
@ -377,7 +377,7 @@ fn search_for_vtable(vcx: &VtableContext,
|
|||||||
location_info.span),
|
location_info.span),
|
||||||
ty,
|
ty,
|
||||||
for_ty) {
|
for_ty) {
|
||||||
result::Err(_) => loop,
|
result::Err(_) => continue,
|
||||||
result::Ok(()) => ()
|
result::Ok(()) => ()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,7 +558,7 @@ impl CoherenceChecker {
|
|||||||
let r = ty::trait_methods(tcx, trait_did);
|
let r = ty::trait_methods(tcx, trait_did);
|
||||||
for method in r.iter() {
|
for method in r.iter() {
|
||||||
debug2!("checking for {}", method.ident.repr(tcx));
|
debug2!("checking for {}", method.ident.repr(tcx));
|
||||||
if provided_names.contains(&method.ident.name) { loop; }
|
if provided_names.contains(&method.ident.name) { continue; }
|
||||||
|
|
||||||
tcx.sess.span_err(trait_ref_span,
|
tcx.sess.span_err(trait_ref_span,
|
||||||
format!("missing method `{}`",
|
format!("missing method `{}`",
|
||||||
@ -730,7 +730,7 @@ impl CoherenceChecker {
|
|||||||
for impl_info in impls.iter() {
|
for impl_info in impls.iter() {
|
||||||
if impl_info.methods.len() < 1 {
|
if impl_info.methods.len() < 1 {
|
||||||
// We'll error out later. For now, just don't ICE.
|
// We'll error out later. For now, just don't ICE.
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
let method_def_id = impl_info.methods[0].def_id;
|
let method_def_id = impl_info.methods[0].def_id;
|
||||||
|
|
||||||
|
@ -919,7 +919,7 @@ impl RegionVarBindings {
|
|||||||
ConstrainVarSubVar(*) |
|
ConstrainVarSubVar(*) |
|
||||||
ConstrainRegSubVar(*) |
|
ConstrainRegSubVar(*) |
|
||||||
ConstrainVarSubReg(*) => {
|
ConstrainVarSubReg(*) => {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
ConstrainRegSubReg(sub, sup) => {
|
ConstrainRegSubReg(sub, sup) => {
|
||||||
(sub, sup)
|
(sub, sup)
|
||||||
@ -927,7 +927,7 @@ impl RegionVarBindings {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if self.is_subregion_of(sub, sup) {
|
if self.is_subregion_of(sub, sup) {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug2!("ConcreteFailure: !(sub <= sup): sub={:?}, sup={:?}",
|
debug2!("ConcreteFailure: !(sub <= sup): sub={:?}, sup={:?}",
|
||||||
|
@ -199,10 +199,10 @@ impl Combine for Sub {
|
|||||||
// or new variables:
|
// or new variables:
|
||||||
match *tainted_region {
|
match *tainted_region {
|
||||||
ty::re_infer(ty::ReVar(ref vid)) => {
|
ty::re_infer(ty::ReVar(ref vid)) => {
|
||||||
if new_vars.iter().any(|x| x == vid) { loop; }
|
if new_vars.iter().any(|x| x == vid) { continue; }
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if *tainted_region == skol { loop; }
|
if *tainted_region == skol { continue; }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ fn clean_srcpath(src: &str, f: &fn(&str)) {
|
|||||||
let p = Path(src);
|
let p = Path(src);
|
||||||
for c in p.components.iter() {
|
for c in p.components.iter() {
|
||||||
if "." == *c {
|
if "." == *c {
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
if ".." == *c {
|
if ".." == *c {
|
||||||
f("up");
|
f("up");
|
||||||
@ -928,7 +928,7 @@ fn item_module(w: &mut io::Writer, cx: &Context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
if myitem.name.is_none() { loop }
|
if myitem.name.is_none() { continue }
|
||||||
write!(w, "
|
write!(w, "
|
||||||
<tr>
|
<tr>
|
||||||
<td><a class='{class}' href='{href}'
|
<td><a class='{class}' href='{href}'
|
||||||
@ -1276,15 +1276,15 @@ fn render_impl(w: &mut io::Writer, i: &clean::Impl, dox: &Option<~str>) {
|
|||||||
match meth.doc_value() {
|
match meth.doc_value() {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
write!(w, "<div class='docblock'>{}</div>", Markdown(s));
|
write!(w, "<div class='docblock'>{}</div>", Markdown(s));
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
None => {}
|
None => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No documentation? Attempt to slurp in the trait's documentation
|
// No documentation? Attempt to slurp in the trait's documentation
|
||||||
let trait_id = match trait_id {
|
let trait_id = match trait_id {
|
||||||
None => loop,
|
None => continue,
|
||||||
Some(id) if is_local(id) => loop,
|
Some(id) if is_local(id) => continue,
|
||||||
Some(id) => id.node,
|
Some(id) => id.node,
|
||||||
};
|
};
|
||||||
do local_data::get(cache_key) |cache| {
|
do local_data::get(cache_key) |cache| {
|
||||||
@ -1369,7 +1369,7 @@ fn build_sidebar(m: &clean::Module) -> HashMap<~str, ~[~str]> {
|
|||||||
for item in m.items.iter() {
|
for item in m.items.iter() {
|
||||||
let short = shortty(item);
|
let short = shortty(item);
|
||||||
let myname = match item.name {
|
let myname = match item.name {
|
||||||
None => loop,
|
None => continue,
|
||||||
Some(ref s) => s.to_owned(),
|
Some(ref s) => s.to_owned(),
|
||||||
};
|
};
|
||||||
let v = map.find_or_insert_with(short.to_owned(), |_| ~[]);
|
let v = map.find_or_insert_with(short.to_owned(), |_| ~[]);
|
||||||
|
@ -234,7 +234,7 @@ fn rust_input(cratefile: &str, matches: &getopts::Matches) -> Output {
|
|||||||
Some(i) => PASSES[i].n1(),
|
Some(i) => PASSES[i].n1(),
|
||||||
None => {
|
None => {
|
||||||
error2!("unknown pass {}, skipping", *pass);
|
error2!("unknown pass {}, skipping", *pass);
|
||||||
loop
|
continue
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
pm.add_plugin(plugin);
|
pm.add_plugin(plugin);
|
||||||
|
@ -569,7 +569,7 @@ pub fn main_args(args: &[~str]) -> int {
|
|||||||
if istty {
|
if istty {
|
||||||
println("()");
|
println("()");
|
||||||
}
|
}
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
run_line(&mut repl, input, out, line, istty);
|
run_line(&mut repl, input, out, line, istty);
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ fn library_in(short_name: &str, version: &Version, dir_to_search: &Path) -> Opti
|
|||||||
// Find a filename that matches the pattern: (lib_prefix)-hash-(version)(lib_suffix)
|
// Find a filename that matches the pattern: (lib_prefix)-hash-(version)(lib_suffix)
|
||||||
// and remember what the hash was
|
// and remember what the hash was
|
||||||
let mut f_name = match p_path.filestem() {
|
let mut f_name = match p_path.filestem() {
|
||||||
Some(s) => s, None => loop
|
Some(s) => s, None => continue
|
||||||
};
|
};
|
||||||
// Already checked the filetype above
|
// Already checked the filetype above
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ pub fn try_getting_local_version(local_path: &Path) -> Option<Version> {
|
|||||||
let local_path = rp.push_rel(local_path);
|
let local_path = rp.push_rel(local_path);
|
||||||
let git_dir = local_path.push(".git");
|
let git_dir = local_path.push(".git");
|
||||||
if !os::path_is_dir(&git_dir) {
|
if !os::path_is_dir(&git_dir) {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
let outp = run::process_output("git",
|
let outp = run::process_output("git",
|
||||||
[format!("--git-dir={}", git_dir.to_str()), ~"tag", ~"-l"]);
|
[format!("--git-dir={}", git_dir.to_str()), ~"tag", ~"-l"]);
|
||||||
@ -109,7 +109,7 @@ pub fn try_getting_local_version(local_path: &Path) -> Option<Version> {
|
|||||||
debug2!("git --git-dir={} tag -l ~~~> {:?}", git_dir.to_str(), outp.status);
|
debug2!("git --git-dir={} tag -l ~~~> {:?}", git_dir.to_str(), outp.status);
|
||||||
|
|
||||||
if outp.status != 0 {
|
if outp.status != 0 {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut output = None;
|
let mut output = None;
|
||||||
|
@ -665,7 +665,7 @@ impl<T:Reader> ReaderUtil for T {
|
|||||||
unsafe {
|
unsafe {
|
||||||
chars.push(transmute(b0 as u32));
|
chars.push(transmute(b0 as u32));
|
||||||
}
|
}
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
// can't satisfy this char with the existing data
|
// can't satisfy this char with the existing data
|
||||||
if end > bytes_len {
|
if end > bytes_len {
|
||||||
|
@ -1150,7 +1150,7 @@ impl<'self, A, T: Iterator<A>> Iterator<A> for Filter<'self, A, T> {
|
|||||||
if (self.predicate)(&x) {
|
if (self.predicate)(&x) {
|
||||||
return Some(x);
|
return Some(x);
|
||||||
} else {
|
} else {
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None
|
None
|
||||||
@ -1173,7 +1173,7 @@ impl<'self, A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for Filter<'sel
|
|||||||
if (self.predicate)(&x) {
|
if (self.predicate)(&x) {
|
||||||
return Some(x);
|
return Some(x);
|
||||||
} else {
|
} else {
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1342,7 +1342,7 @@ impl<'self, A, T: Iterator<A>> Iterator<A> for SkipWhile<'self, A, T> {
|
|||||||
Some(x) => {
|
Some(x) => {
|
||||||
if (self.predicate)(&x) {
|
if (self.predicate)(&x) {
|
||||||
next = self.iter.next();
|
next = self.iter.next();
|
||||||
loop
|
continue
|
||||||
} else {
|
} else {
|
||||||
self.flag = true;
|
self.flag = true;
|
||||||
return Some(x)
|
return Some(x)
|
||||||
@ -1415,7 +1415,7 @@ impl<A, T: Iterator<A>> Iterator<A> for Skip<T> {
|
|||||||
match next {
|
match next {
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
next = self.iter.next();
|
next = self.iter.next();
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
self.n = 0;
|
self.n = 0;
|
||||||
|
@ -355,7 +355,7 @@ pub fn float_to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+Float+Round+
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Skip the '.'
|
// Skip the '.'
|
||||||
if buf[i] == '.' as u8 { i -= 1; loop; }
|
if buf[i] == '.' as u8 { i -= 1; continue; }
|
||||||
|
|
||||||
// Either increment the digit,
|
// Either increment the digit,
|
||||||
// or set to 0 if max and carry the 1.
|
// or set to 0 if max and carry the 1.
|
||||||
|
@ -992,11 +992,11 @@ impl GenericPath for WindowsPath {
|
|||||||
pub fn normalize(components: &[~str]) -> ~[~str] {
|
pub fn normalize(components: &[~str]) -> ~[~str] {
|
||||||
let mut cs = ~[];
|
let mut cs = ~[];
|
||||||
for c in components.iter() {
|
for c in components.iter() {
|
||||||
if *c == ~"." && components.len() > 1 { loop; }
|
if *c == ~"." && components.len() > 1 { continue; }
|
||||||
if *c == ~"" { loop; }
|
if *c == ~"" { continue; }
|
||||||
if *c == ~".." && cs.len() != 0 {
|
if *c == ~".." && cs.len() != 0 {
|
||||||
cs.pop();
|
cs.pop();
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
cs.push((*c).clone());
|
cs.push((*c).clone());
|
||||||
}
|
}
|
||||||
|
@ -543,7 +543,7 @@ pub trait Rng {
|
|||||||
for (i, elem) in iter.enumerate() {
|
for (i, elem) in iter.enumerate() {
|
||||||
if i < n {
|
if i < n {
|
||||||
reservoir.push(elem);
|
reservoir.push(elem);
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
let k = self.gen_integer_range(0, i + 1);
|
let k = self.gen_integer_range(0, i + 1);
|
||||||
|
@ -92,14 +92,14 @@ fn parse_logging_spec(spec: ~str) -> ~[LogDirective]{
|
|||||||
_ => {
|
_ => {
|
||||||
dumb_println(format!("warning: invalid logging spec \
|
dumb_println(format!("warning: invalid logging spec \
|
||||||
'{}', ignoring it", parts[1]));
|
'{}', ignoring it", parts[1]));
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
dumb_println(format!("warning: invalid logging spec '{}',\
|
dumb_println(format!("warning: invalid logging spec '{}',\
|
||||||
ignoring it", s));
|
ignoring it", s));
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dir = LogDirective {name: name, level: log_level};
|
let dir = LogDirective {name: name, level: log_level};
|
||||||
|
@ -1057,12 +1057,12 @@ mod test {
|
|||||||
Mark(mrk,tail) => {
|
Mark(mrk,tail) => {
|
||||||
result.push(M(mrk));
|
result.push(M(mrk));
|
||||||
sc = tail;
|
sc = tail;
|
||||||
loop;
|
continue;
|
||||||
},
|
},
|
||||||
Rename(id,name,tail) => {
|
Rename(id,name,tail) => {
|
||||||
result.push(R(id,name));
|
result.push(R(id,name));
|
||||||
sc = tail;
|
sc = tail;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
IllegalCtxt => fail2!("expected resolvable context, got IllegalCtxt")
|
IllegalCtxt => fail2!("expected resolvable context, got IllegalCtxt")
|
||||||
}
|
}
|
||||||
|
@ -340,7 +340,7 @@ pub fn find_stability<AM: AttrMetaMethods, It: Iterator<AM>>(mut metas: It) -> O
|
|||||||
"stable" => Stable,
|
"stable" => Stable,
|
||||||
"frozen" => Frozen,
|
"frozen" => Frozen,
|
||||||
"locked" => Locked,
|
"locked" => Locked,
|
||||||
_ => loop // not a stability level
|
_ => continue // not a stability level
|
||||||
};
|
};
|
||||||
|
|
||||||
return Some(Stability {
|
return Some(Stability {
|
||||||
|
@ -108,7 +108,7 @@ impl Context {
|
|||||||
named `{}`", name));
|
named `{}`", name));
|
||||||
self.ecx.parse_sess.span_diagnostic.span_note(
|
self.ecx.parse_sess.span_diagnostic.span_note(
|
||||||
prev.span, "previously here");
|
prev.span, "previously here");
|
||||||
loop
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.names.insert(name, e);
|
self.names.insert(name, e);
|
||||||
@ -592,7 +592,7 @@ impl Context {
|
|||||||
// of each variable because we don't want to move out of the arguments
|
// of each variable because we don't want to move out of the arguments
|
||||||
// passed to this function.
|
// passed to this function.
|
||||||
for (i, &e) in self.args.iter().enumerate() {
|
for (i, &e) in self.args.iter().enumerate() {
|
||||||
if self.arg_types[i].is_none() { loop } // error already generated
|
if self.arg_types[i].is_none() { continue } // error already generated
|
||||||
|
|
||||||
let name = self.ecx.ident_of(format!("__arg{}", i));
|
let name = self.ecx.ident_of(format!("__arg{}", i));
|
||||||
let e = self.ecx.expr_addr_of(e.span, e);
|
let e = self.ecx.expr_addr_of(e.span, e);
|
||||||
@ -601,7 +601,7 @@ impl Context {
|
|||||||
self.ecx.expr_ident(e.span, name)));
|
self.ecx.expr_ident(e.span, name)));
|
||||||
}
|
}
|
||||||
for (&name, &e) in self.names.iter() {
|
for (&name, &e) in self.names.iter() {
|
||||||
if !self.name_types.contains_key(&name) { loop }
|
if !self.name_types.contains_key(&name) { continue }
|
||||||
|
|
||||||
let lname = self.ecx.ident_of(format!("__arg{}", name));
|
let lname = self.ecx.ident_of(format!("__arg{}", name));
|
||||||
let e = self.ecx.expr_addr_of(e.span, e);
|
let e = self.ecx.expr_addr_of(e.span, e);
|
||||||
|
@ -431,7 +431,7 @@ fn scan_digits(rdr: @mut StringReader, radix: uint) -> ~str {
|
|||||||
let mut rslt = ~"";
|
let mut rslt = ~"";
|
||||||
loop {
|
loop {
|
||||||
let c = rdr.curr;
|
let c = rdr.curr;
|
||||||
if c == '_' { bump(rdr); loop; }
|
if c == '_' { bump(rdr); continue; }
|
||||||
match char::to_digit(c, radix) {
|
match char::to_digit(c, radix) {
|
||||||
Some(_) => {
|
Some(_) => {
|
||||||
rslt.push_char(c);
|
rslt.push_char(c);
|
||||||
|
@ -1987,7 +1987,7 @@ impl Parser {
|
|||||||
}
|
}
|
||||||
_ => self.unexpected()
|
_ => self.unexpected()
|
||||||
}
|
}
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
if self.expr_is_complete(e) { break; }
|
if self.expr_is_complete(e) { break; }
|
||||||
match *self.token {
|
match *self.token {
|
||||||
|
@ -1406,7 +1406,7 @@ pub fn print_expr(s: @ps, expr: &ast::Expr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast::ExprAgain(opt_ident) => {
|
ast::ExprAgain(opt_ident) => {
|
||||||
word(s.s, "loop");
|
word(s.s, "continue");
|
||||||
space(s.s);
|
space(s.s);
|
||||||
for ident in opt_ident.iter() {
|
for ident in opt_ident.iter() {
|
||||||
word(s.s, "'");
|
word(s.s, "'");
|
||||||
|
@ -196,7 +196,7 @@ fn main() {
|
|||||||
while !rdr.eof() {
|
while !rdr.eof() {
|
||||||
let line: ~str = rdr.read_line();
|
let line: ~str = rdr.read_line();
|
||||||
|
|
||||||
if line.len() == 0u { loop; }
|
if line.len() == 0u { continue; }
|
||||||
|
|
||||||
match (line[0] as char, proc_mode) {
|
match (line[0] as char, proc_mode) {
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ fn main() {
|
|||||||
stdout);
|
stdout);
|
||||||
|
|
||||||
pos = 0;
|
pos = 0;
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Complement other lines.
|
// Complement other lines.
|
||||||
|
@ -135,7 +135,7 @@ fn loop_loop_pops_scopes<'r>(_v: &'r mut [uint], f: &fn(&'r mut uint) -> bool) {
|
|||||||
// this borrow is limited to the scope of `r`...
|
// this borrow is limited to the scope of `r`...
|
||||||
let r: &'r mut uint = produce();
|
let r: &'r mut uint = produce();
|
||||||
if !f(&mut *r) {
|
if !f(&mut *r) {
|
||||||
loop; // ...so it is not live as exit (and re-enter) the `while` loop here
|
continue; // ...so it is not live as exit (and re-enter) the `while` loop here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,15 +19,15 @@ pub fn main() {
|
|||||||
if *x == 3 { break; } assert!((*x <= 3));
|
if *x == 3 { break; } assert!((*x <= 3));
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
while i < 10 { i += 1; if i % 2 == 0 { loop; } assert!((i % 2 != 0)); }
|
while i < 10 { i += 1; if i % 2 == 0 { continue; } assert!((i % 2 != 0)); }
|
||||||
i = 0;
|
i = 0;
|
||||||
loop {
|
loop {
|
||||||
i += 1; if i % 2 == 0 { loop; } assert!((i % 2 != 0));
|
i += 1; if i % 2 == 0 { continue; } assert!((i % 2 != 0));
|
||||||
if i >= 10 { break; }
|
if i >= 10 { break; }
|
||||||
}
|
}
|
||||||
let ys = ~[1, 2, 3, 4, 5, 6];
|
let ys = ~[1, 2, 3, 4, 5, 6];
|
||||||
for x in ys.iter() {
|
for x in ys.iter() {
|
||||||
if *x % 2 == 0 { loop; }
|
if *x % 2 == 0 { continue; }
|
||||||
assert!((*x % 2 != 0));
|
assert!((*x % 2 != 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ pub fn main() {
|
|||||||
let mut y = 0;
|
let mut y = 0;
|
||||||
for (n,i) in x.iter().enumerate() {
|
for (n,i) in x.iter().enumerate() {
|
||||||
if n < 10 {
|
if n < 10 {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
y += *i;
|
y += *i;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ pub fn main() {
|
|||||||
break 'bar;
|
break 'bar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
loop 'foo;
|
continue 'foo;
|
||||||
}
|
}
|
||||||
x = 42;
|
x = 42;
|
||||||
break;
|
break;
|
||||||
|
@ -27,7 +27,7 @@ pub fn main() {
|
|||||||
is_even = false;
|
is_even = false;
|
||||||
i += 1u;
|
i += 1u;
|
||||||
if i % 2u != 0u {
|
if i % 2u != 0u {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
is_even = true;
|
is_even = true;
|
||||||
}
|
}
|
||||||
@ -40,7 +40,7 @@ pub fn main() {
|
|||||||
is_even = false;
|
is_even = false;
|
||||||
i += 1u;
|
i += 1u;
|
||||||
if i % 2u != 0u {
|
if i % 2u != 0u {
|
||||||
loop;
|
continue;
|
||||||
}
|
}
|
||||||
is_even = true;
|
is_even = true;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ use std::task;
|
|||||||
|
|
||||||
fn test_break() { loop { let _x: @int = break; } }
|
fn test_break() { loop { let _x: @int = break; } }
|
||||||
|
|
||||||
fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: @int = loop; } }
|
fn test_cont() { let mut i = 0; while i < 1 { i += 1; let _x: @int = continue; } }
|
||||||
|
|
||||||
fn test_ret() { let _x: @int = return; }
|
fn test_ret() { let _x: @int = return; }
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ fn canttouchthis() -> uint {
|
|||||||
fn angrydome() {
|
fn angrydome() {
|
||||||
loop { if break { } }
|
loop { if break { } }
|
||||||
let mut i = 0;
|
let mut i = 0;
|
||||||
loop { i += 1; if i == 1 { match (loop) { 1 => { }, _ => fail2!("wat") } }
|
loop { i += 1; if i == 1 { match (continue) { 1 => { }, _ => fail2!("wat") } }
|
||||||
break; }
|
break; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user