]> git.lizzy.rs Git - rust.git/commitdiff
Fixed some occurrences of 'if' being spelled 'iff'
authorEsption <esption@gmail.com>
Wed, 8 Jul 2015 10:29:03 +0000 (05:29 -0500)
committerEsption <esption@gmail.com>
Wed, 8 Jul 2015 10:29:03 +0000 (05:29 -0500)
17 files changed:
src/libbacktrace/aclocal.m4
src/libbacktrace/hashtab.h
src/libbacktrace/ltmain.sh
src/libcollections/vec_deque.rs
src/libcore/num/mod.rs
src/libcore/str/pattern.rs
src/librand/distributions/gamma.rs
src/librustc/middle/ty.rs
src/librustc/util/common.rs
src/librustc_borrowck/borrowck/README.md
src/librustc_privacy/lib.rs
src/librustc_typeck/variance.rs
src/libstd/net/parser.rs
src/libsyntax/ext/tt/macro_parser.rs
src/test/compile-fail/regions-variance-contravariant-use-covariant.rs
src/test/run-pass/deriving-cmp-shortcircuit.rs
src/test/run-pass/regions-variance-covariant-use-covariant.rs

index 42214c2233ac87437820fa06383933884281d3c4..f318083ba9377a78745caf0dad765f42561aec83 100644 (file)
@@ -88,7 +88,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # start a VPATH build or use an absolute $srcdir.
 #
 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+# if we strip the leading $srcdir from $ac_aux_dir.  That would be:
 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
 # and then we would define $MISSING as
 #   MISSING="\${SHELL} $am_aux_dir/missing"
index 3736622e67739cf97ea710b95a4fdbd66fbb9921..e641d67abb0f1a0569493adc951e104917ca5f26 100644 (file)
@@ -69,7 +69,7 @@ typedef void (*htab_del) (void *);
 typedef int (*htab_trav) (void **, void *);
 
 /* Memory-allocation function, with the same functionality as calloc().
-   Iff it returns NULL, the hash table implementation will pass an error
+   If it returns NULL, the hash table implementation will pass an error
    code back to the user, so if your code doesn't handle errors,
    best if you use xcalloc instead.  */
 typedef void *(*htab_alloc) (size_t, size_t);
index 84f5be9249e7caae28e6c16faccaba9f84096f12..e7c5b6fb8b64affea0128d83364e8a92a93e02ca 100644 (file)
@@ -1059,7 +1059,7 @@ $opt_help || {
 
 
 # func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True if FILE is a libtool `.la' library or `.lo' object file.
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_lalib_p ()
@@ -1070,7 +1070,7 @@ func_lalib_p ()
 }
 
 # func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
+# True if FILE is a libtool `.la' library or `.lo' object file.
 # This function implements the same check as func_lalib_p without
 # resorting to external programs.  To this end, it redirects stdin and
 # closes it afterwards, without saving the original file descriptor.
@@ -1093,7 +1093,7 @@ func_lalib_unsafe_p ()
 }
 
 # func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
+# True if FILE is a libtool wrapper script
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_ltwrapper_script_p ()
@@ -1102,7 +1102,7 @@ func_ltwrapper_script_p ()
 }
 
 # func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
+# True if FILE is a libtool wrapper executable
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_ltwrapper_executable_p ()
@@ -1130,7 +1130,7 @@ func_ltwrapper_scriptname ()
 }
 
 # func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
+# True if FILE is a libtool wrapper script or wrapper executable
 # This function is only a basic sanity check; it will hardly flush out
 # determined imposters.
 func_ltwrapper_p ()
index 2aeb303068bdf108c474e786ff7e618a04572161..132a796d56751af64cbb96f154b620cc2a836b3a 100644 (file)
@@ -108,7 +108,7 @@ unsafe fn buffer_write(&mut self, off: usize, t: T) {
         ptr::write(self.ptr.offset(off as isize), t);
     }
 
-    /// Returns true iff the buffer is at capacity
+    /// Returns true if the buffer is at capacity
     #[inline]
     fn is_full(&self) -> bool { self.cap - self.len() == 1 }
 
index fd5ef4b1ccccaab3a384cf2b28e7047621f92776..f7dd739f2684fafa29bb01fcb83460feb9156df6 100644 (file)
@@ -1126,7 +1126,7 @@ pub fn pow(self, mut exp: u32) -> Self {
             acc
         }
 
-        /// Returns `true` iff `self == 2^k` for some `k`.
+        /// Returns `true` if `self == 2^k` for some `k`.
         #[stable(feature = "rust1", since = "1.0.0")]
         #[inline]
         pub fn is_power_of_two(self) -> bool {
index 707f7fcf2abcf9c85de792b22bd3d8232f88d8ec..b2b36925aababbb5b95ae3e1622e4d1236625d72 100644 (file)
@@ -739,7 +739,7 @@ struct TwoWaySearcher {
     (We also allow for the possibility of the *empty word*, a word of length zero).
 
     If x is any non-empty word, then an integer p with 0 < p <= |x| is said to be a
-    *period* for x iff for all i with 0 <= i <= |x| - p - 1, we have x[i] == x[i+p].
+    *period* for x if for all i with 0 <= i <= |x| - p - 1, we have x[i] == x[i+p].
     For example, both 1 and 2 are periods for the string "aa". As another example,
     the only period of the string "abcd" is 4.
 
index 2951563934b3c412d273bf4ef91394806fbb41ee..5649c7def6f591d84576b4a4c5c5190f7d415a34 100644 (file)
@@ -147,7 +147,7 @@ fn ind_sample<R: Rng>(&self, rng: &mut R) -> f64 {
         loop {
             let StandardNormal(x) = rng.gen::<StandardNormal>();
             let v_cbrt = 1.0 + self.c * x;
-            if v_cbrt <= 0.0 { // a^3 <= 0 iff a <= 0
+            if v_cbrt <= 0.0 { // a^3 <= 0 if a <= 0
                 continue
             }
 
index 715072a12ebd041da5a5f64d05a8320d71bcf5ad..b3d0f53a1fc15e7e8598d9143688b4d67effdd1b 100644 (file)
@@ -509,9 +509,9 @@ pub struct ItemVariances {
 
 #[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Copy)]
 pub enum Variance {
-    Covariant,      // T<A> <: T<B> iff A <: B -- e.g., function return type
-    Invariant,      // T<A> <: T<B> iff B == A -- e.g., type of mutable cell
-    Contravariant,  // T<A> <: T<B> iff B <: A -- e.g., function param type
+    Covariant,      // T<A> <: T<B> if A <: B -- e.g., function return type
+    Invariant,      // T<A> <: T<B> if B == A -- e.g., type of mutable cell
+    Contravariant,  // T<A> <: T<B> if B <: A -- e.g., function param type
     Bivariant,      // T<A> <: T<B>            -- e.g., unused type parameter
 }
 
index 162bf6ed9a97f5dbfb6c8393fb51b299e812249c..a89a42d2fcae4abbb87baaa52f6be140a78b04e7 100644 (file)
@@ -145,7 +145,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
     }
 }
 
-// Takes a predicate p, returns true iff p is true for any subexpressions
+// Takes a predicate p, returns true if p is true for any subexpressions
 // of b -- skipping any inner loops (loop, while, loop_body)
 pub fn loop_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr_) -> bool {
     let mut v = LoopQueryVisitor {
@@ -168,7 +168,7 @@ fn visit_expr(&mut self, e: &ast::Expr) {
     }
 }
 
-// Takes a predicate p, returns true iff p is true for any subexpressions
+// Takes a predicate p, returns true if p is true for any subexpressions
 // of b -- skipping any inner loops (loop, while, loop_body)
 pub fn block_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr) -> bool {
     let mut v = BlockQueryVisitor {
index 5cfbd59d3336881ecc0e6d450ae8198e338c3af4..3cde35aa84b39fb7449f3d58543789967fc454b0 100644 (file)
@@ -877,7 +877,7 @@ Thus the presence of an assignment bit indicates that the assignment
 may have occurred. Note that assignments are only killed when the
 variable goes out of scope, as it is not relevant whether or not there
 has been a move in the meantime. Using these bits, we can declare that
-an assignment to an immutable variable is legal iff there is no other
+an assignment to an immutable variable is legal if there is no other
 assignment bit to that same variable in scope.
 
 ## Why is the design made this way?
index d90e5a033a187bb90de3360811dc61e3d7450f99..7c7d45788af7a17ad26110218715dc43e1b75e23 100644 (file)
@@ -1319,7 +1319,7 @@ fn visit_item(&mut self, item: &ast::Item) {
 
                 // miscellaneous info about the impl
 
-                // `true` iff this is `impl Private for ...`.
+                // `true` if this is `impl Private for ...`.
                 let not_private_trait =
                     trait_ref.as_ref().map_or(true, // no trait counts as public trait
                                               |tr| {
@@ -1328,7 +1328,7 @@ fn visit_item(&mut self, item: &ast::Item) {
                         !is_local(did) || self.trait_is_public(did.node)
                     });
 
-                // `true` iff this is a trait impl or at least one method is public.
+                // `true` if this is a trait impl or at least one method is public.
                 //
                 // `impl Public { $( fn ...() {} )* }` is not visible.
                 //
index c1f9725fc8134191721eb1e0b52a24b50a98a1a0..996cab1cb0ac9d384b934d4139d625b51375ad0a 100644 (file)
 //! this case, because the `Self` parameter is contravariant and `A` is
 //! covariant, it means that:
 //!
-//!     V_O <: V_S iff
+//!     V_O <: V_S if
 //!         int <: int
 //!         String <: Object
 //!
index b0fadb56f36ac7db9ff0a9c8dd6a77de80bf3b31..13bfaf0eb6cfde37466177fb2f65b2b6d1b18d2b 100644 (file)
@@ -104,7 +104,7 @@ fn read_char(&mut self) -> Option<char> {
         }
     }
 
-    // Return char and advance iff next char is equal to requested
+    // Return char and advance if next char is equal to requested
     fn read_given_char(&mut self, c: char) -> Option<char> {
         self.read_atomically(|p| {
             match p.read_char() {
index 5521c68e75c6950f513c3519411d009983f1f490..065b49461605acf5e2408b124f839b774c038a43 100644 (file)
@@ -321,7 +321,7 @@ pub fn parse(sess: &ParseSess,
             if idx >= len {
                 // can't move out of `match`es, so:
                 if ei.up.is_some() {
-                    // hack: a matcher sequence is repeating iff it has a
+                    // hack: a matcher sequence is repeating if it has a
                     // parent (the top level is just a container)
 
 
index a79249ade4f5ccd9185ef7cee6f9d590f4c1080a..37bc0f41e1b6c70002f9cb031dc58a8bf88538d6 100644 (file)
@@ -15,7 +15,7 @@
 // variance inference works in the first place.
 
 // This is contravariant with respect to 'a, meaning that
-// Contravariant<'long> <: Contravariant<'short> iff
+// Contravariant<'long> <: Contravariant<'short> if
 // 'short <= 'long
 struct Contravariant<'a> {
     f: &'a isize
index e22e4767d521fd78fa9437d1e4cf980c7549f9b9..ef41c051f38ba240f6671e6296ab61a5dd266e66 100644 (file)
@@ -10,7 +10,7 @@
 
 // check that the derived impls for the comparison traits shortcircuit
 // where possible, by having a type that panics when compared as the
-// second element, so this passes iff the instances shortcircuit.
+// second element, so this passes if the instances shortcircuit.
 
 
 use std::cmp::Ordering;
index 02562781373a88e0da179a617ca0442317eb4fa0..55f845fcac8362c37d9e6a395641bd3e4134603b 100644 (file)
@@ -24,7 +24,7 @@ struct Covariant<'a> {
 }
 
 fn use_<'a>(c: Covariant<'a>) {
-    // OK Because Covariant<'a> <: Covariant<'static> iff 'a <= 'static
+    // OK Because Covariant<'a> <: Covariant<'static> if 'a <= 'static
     let _: Covariant<'static> = c;
 }