about summary refs log tree commit diff
path: root/src/fuzzer
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-01 17:30:05 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-01 19:16:06 -0700
commitb355936b4da0831f47afe8f251daee503c8caa32 (patch)
tree9f870e26f773af714cbcf7f315de5ff3722300c3 /src/fuzzer
parentdc499f193e473abc78c557feaa86969bbe7aa159 (diff)
Convert ret to return
Diffstat (limited to 'src/fuzzer')
-rw-r--r--src/fuzzer/ast_match.rs10
-rw-r--r--src/fuzzer/cycles.rs2
-rw-r--r--src/fuzzer/fuzzer.rs22
-rw-r--r--src/fuzzer/ivec_fuzz.rs2
-rw-r--r--src/fuzzer/rand_util.rs2
5 files changed, 19 insertions, 19 deletions
diff --git a/src/fuzzer/ast_match.rs b/src/fuzzer/ast_match.rs
index abfcac55534..dc063438e04 100644
--- a/src/fuzzer/ast_match.rs
+++ b/src/fuzzer/ast_match.rs
@@ -5,17 +5,17 @@ fn vec_equal<T>(v: ~[T], u: ~[T],
                 element_equality_test: fn@(&&T, &&T) -> bool) ->
    bool {
     let Lv = vec::len(v);
-    if Lv != vec::len(u) { ret false; }
+    if Lv != vec::len(u) { return false; }
     let i = 0u;
     while i < Lv {
-        if !element_equality_test(v[i], u[i]) { ret false; }
+        if !element_equality_test(v[i], u[i]) { return false; }
         i += 1u;
     }
-    ret true;
+    return true;
 }
 
-pure fn builtin_equal<T>(&&a: T, &&b: T) -> bool { ret a == b; }
-pure fn builtin_equal_int(&&a: int, &&b: int) -> bool { ret a == b; }
+pure fn builtin_equal<T>(&&a: T, &&b: T) -> bool { return a == b; }
+pure fn builtin_equal_int(&&a: int, &&b: int) -> bool { return a == b; }
 
 fn main() {
     assert (builtin_equal(5, 5));
diff --git a/src/fuzzer/cycles.rs b/src/fuzzer/cycles.rs
index dbb4ecdbaef..f0e2d7df348 100644
--- a/src/fuzzer/cycles.rs
+++ b/src/fuzzer/cycles.rs
@@ -39,7 +39,7 @@ type pointy = {
 // To add: objects; traits; anything type-parameterized?
 
 fn empty_pointy() -> @pointy {
-    ret @{
+    return @{
         mut a : none,
         mut b : ~none,
         mut c : @none,
diff --git a/src/fuzzer/fuzzer.rs b/src/fuzzer/fuzzer.rs
index ea10ff58049..39f33b732d8 100644
--- a/src/fuzzer/fuzzer.rs
+++ b/src/fuzzer/fuzzer.rs
@@ -450,7 +450,7 @@ fn has_raw_pointers(c: ast::crate) -> bool {
         visit::mk_simple_visitor(@{visit_ty: |a| visit_ty(has_rp, a)
                                       with *visit::default_simple_visitor()});
     visit::visit_crate(c, (), v);
-    ret *has_rp;
+    return *has_rp;
 }
 
 fn content_is_dangerous_to_run(code: ~str) -> bool {
@@ -461,16 +461,16 @@ fn content_is_dangerous_to_run(code: ~str) -> bool {
          ~"unsafe",
          ~"log"];    // python --> rust pipe deadlock?
 
-    for dangerous_patterns.each |p| { if contains(code, p) { ret true; } }
-    ret false;
+    for dangerous_patterns.each |p| { if contains(code, p) { return true; } }
+    return false;
 }
 
 fn content_is_dangerous_to_compile(code: ~str) -> bool {
     let dangerous_patterns =
         ~[~"xfail-test"];
 
-    for dangerous_patterns.each |p| { if contains(code, p) { ret true; } }
-    ret false;
+    for dangerous_patterns.each |p| { if contains(code, p) { return true; } }
+    return false;
 }
 
 fn content_might_not_converge(code: ~str) -> bool {
@@ -485,8 +485,8 @@ fn content_might_not_converge(code: ~str) -> bool {
          ~"\n\n\n\n\n"  // https://github.com/mozilla/rust/issues/850
         ];
 
-    for confusing_patterns.each |p| { if contains(code, p) { ret true; } }
-    ret false;
+    for confusing_patterns.each |p| { if contains(code, p) { return true; } }
+    return false;
 }
 
 fn file_might_not_converge(filename: ~str) -> bool {
@@ -499,9 +499,9 @@ fn file_might_not_converge(filename: ~str) -> bool {
     ];
 
 
-    for confusing_files.each |f| { if contains(filename, f) { ret true; } }
+    for confusing_files.each |f| { if contains(filename, f) { return true; } }
 
-    ret false;
+    return false;
 }
 
 fn check_roundtrip_convergence(code: @~str, maxIters: uint) {
@@ -512,7 +512,7 @@ fn check_roundtrip_convergence(code: @~str, maxIters: uint) {
 
     while i < maxIters {
         oldv = newv;
-        if content_might_not_converge(*oldv) { ret; }
+        if content_might_not_converge(*oldv) { return; }
         newv = @parse_and_print(oldv);
         if oldv == newv { break; }
         i += 1u;
@@ -592,7 +592,7 @@ fn check_variants(files: ~[~str], cx: context) {
 fn main(args: ~[~str]) {
     if vec::len(args) != 2u {
         error!{"usage: %s <testdir>", args[0]};
-        ret;
+        return;
     }
     let mut files = ~[];
     let root = args[1];
diff --git a/src/fuzzer/ivec_fuzz.rs b/src/fuzzer/ivec_fuzz.rs
index 002654b6f6e..709f2e10c31 100644
--- a/src/fuzzer/ivec_fuzz.rs
+++ b/src/fuzzer/ivec_fuzz.rs
@@ -91,7 +91,7 @@ fn vec_to_str(v: ~[int]) -> str {
         if i + 1u < len(v) { s += ", "; }
         i += 1u;
     }
-    ret s + "]";
+    return s + "]";
 }
 
 fn show_edits(a: ~[int], xs: ~[int]) {
diff --git a/src/fuzzer/rand_util.rs b/src/fuzzer/rand_util.rs
index ab3c4185e0a..035b2a5e448 100644
--- a/src/fuzzer/rand_util.rs
+++ b/src/fuzzer/rand_util.rs
@@ -51,7 +51,7 @@ fn weighted_choice<T: copy>(r : rand::rng, v : ~[weighted<T>]) -> T {
     for {weight: weight, item: item} in v {
         so_far += weight;
         if so_far > chosen {
-            ret item;
+            return item;
         }
     }
     core::unreachable();