Skip to content

Commit dad8cd1

Browse files
committed
'iff' for docs to 'if and only if'
1 parent 492f33a commit dad8cd1

File tree

17 files changed

+25
-25
lines changed

17 files changed

+25
-25
lines changed

src/libbacktrace/aclocal.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8888
# start a VPATH build or use an absolute $srcdir.
8989
#
9090
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91-
# if we strip the leading $srcdir from $ac_aux_dir. That would be:
91+
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9292
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9393
# and then we would define $MISSING as
9494
# MISSING="\${SHELL} $am_aux_dir/missing"

src/libbacktrace/hashtab.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ typedef void (*htab_del) (void *);
6969
typedef int (*htab_trav) (void **, void *);
7070

7171
/* Memory-allocation function, with the same functionality as calloc().
72-
If it returns NULL, the hash table implementation will pass an error
72+
Iff it returns NULL, the hash table implementation will pass an error
7373
code back to the user, so if your code doesn't handle errors,
7474
best if you use xcalloc instead. */
7575
typedef void *(*htab_alloc) (size_t, size_t);

src/libbacktrace/ltmain.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ $opt_help || {
10591059

10601060

10611061
# func_lalib_p file
1062-
# True if FILE is a libtool `.la' library or `.lo' object file.
1062+
# True iff FILE is a libtool `.la' library or `.lo' object file.
10631063
# This function is only a basic sanity check; it will hardly flush out
10641064
# determined imposters.
10651065
func_lalib_p ()
@@ -1070,7 +1070,7 @@ func_lalib_p ()
10701070
}
10711071

10721072
# func_lalib_unsafe_p file
1073-
# True if FILE is a libtool `.la' library or `.lo' object file.
1073+
# True iff FILE is a libtool `.la' library or `.lo' object file.
10741074
# This function implements the same check as func_lalib_p without
10751075
# resorting to external programs. To this end, it redirects stdin and
10761076
# closes it afterwards, without saving the original file descriptor.
@@ -1093,7 +1093,7 @@ func_lalib_unsafe_p ()
10931093
}
10941094

10951095
# func_ltwrapper_script_p file
1096-
# True if FILE is a libtool wrapper script
1096+
# True iff FILE is a libtool wrapper script
10971097
# This function is only a basic sanity check; it will hardly flush out
10981098
# determined imposters.
10991099
func_ltwrapper_script_p ()
@@ -1102,7 +1102,7 @@ func_ltwrapper_script_p ()
11021102
}
11031103

11041104
# func_ltwrapper_executable_p file
1105-
# True if FILE is a libtool wrapper executable
1105+
# True iff FILE is a libtool wrapper executable
11061106
# This function is only a basic sanity check; it will hardly flush out
11071107
# determined imposters.
11081108
func_ltwrapper_executable_p ()
@@ -1130,7 +1130,7 @@ func_ltwrapper_scriptname ()
11301130
}
11311131

11321132
# func_ltwrapper_p file
1133-
# True if FILE is a libtool wrapper script or wrapper executable
1133+
# True iff FILE is a libtool wrapper script or wrapper executable
11341134
# This function is only a basic sanity check; it will hardly flush out
11351135
# determined imposters.
11361136
func_ltwrapper_p ()

src/libcollections/vec_deque.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<T> VecDeque<T> {
108108
ptr::write(self.ptr.offset(off as isize), t);
109109
}
110110

111-
/// Returns true if the buffer is at capacity
111+
/// Returns true if and only if the buffer is at capacity
112112
#[inline]
113113
fn is_full(&self) -> bool { self.cap - self.len() == 1 }
114114

src/libcore/num/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ macro_rules! uint_impl {
11261126
acc
11271127
}
11281128

1129-
/// Returns `true` if `self == 2^k` for some `k`.
1129+
/// Returns `true` if and only if `self == 2^k` for some `k`.
11301130
#[stable(feature = "rust1", since = "1.0.0")]
11311131
#[inline]
11321132
pub fn is_power_of_two(self) -> bool {

src/libcore/str/pattern.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ struct TwoWaySearcher {
739739
(We also allow for the possibility of the *empty word*, a word of length zero).
740740
741741
If x is any non-empty word, then an integer p with 0 < p <= |x| is said to be a
742-
*period* for x if for all i with 0 <= i <= |x| - p - 1, we have x[i] == x[i+p].
742+
*period* for x iff for all i with 0 <= i <= |x| - p - 1, we have x[i] == x[i+p].
743743
For example, both 1 and 2 are periods for the string "aa". As another example,
744744
the only period of the string "abcd" is 4.
745745

src/librand/distributions/gamma.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl IndependentSample<f64> for GammaLargeShape {
147147
loop {
148148
let StandardNormal(x) = rng.gen::<StandardNormal>();
149149
let v_cbrt = 1.0 + self.c * x;
150-
if v_cbrt <= 0.0 { // a^3 <= 0 if a <= 0
150+
if v_cbrt <= 0.0 { // a^3 <= 0 iff a <= 0
151151
continue
152152
}
153153

src/librustc/middle/ty.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ pub struct ItemVariances {
509509

510510
#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Copy)]
511511
pub enum Variance {
512-
Covariant, // T<A> <: T<B> if A <: B -- e.g., function return type
513-
Invariant, // T<A> <: T<B> if B == A -- e.g., type of mutable cell
514-
Contravariant, // T<A> <: T<B> if B <: A -- e.g., function param type
512+
Covariant, // T<A> <: T<B> iff A <: B -- e.g., function return type
513+
Invariant, // T<A> <: T<B> iff B == A -- e.g., type of mutable cell
514+
Contravariant, // T<A> <: T<B> iff B <: A -- e.g., function param type
515515
Bivariant, // T<A> <: T<B> -- e.g., unused type parameter
516516
}
517517

src/librustc/util/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'v, P> Visitor<'v> for LoopQueryVisitor<P> where P: FnMut(&ast::Expr_) -> b
145145
}
146146
}
147147

148-
// Takes a predicate p, returns true if p is true for any subexpressions
148+
// Takes a predicate p, returns true iff p is true for any subexpressions
149149
// of b -- skipping any inner loops (loop, while, loop_body)
150150
pub fn loop_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr_) -> bool {
151151
let mut v = LoopQueryVisitor {
@@ -168,7 +168,7 @@ impl<'v, P> Visitor<'v> for BlockQueryVisitor<P> where P: FnMut(&ast::Expr) -> b
168168
}
169169
}
170170

171-
// Takes a predicate p, returns true if p is true for any subexpressions
171+
// Takes a predicate p, returns true iff p is true for any subexpressions
172172
// of b -- skipping any inner loops (loop, while, loop_body)
173173
pub fn block_query<P>(b: &ast::Block, p: P) -> bool where P: FnMut(&ast::Expr) -> bool {
174174
let mut v = BlockQueryVisitor {

src/librustc_borrowck/borrowck/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ Thus the presence of an assignment bit indicates that the assignment
877877
may have occurred. Note that assignments are only killed when the
878878
variable goes out of scope, as it is not relevant whether or not there
879879
has been a move in the meantime. Using these bits, we can declare that
880-
an assignment to an immutable variable is legal if there is no other
880+
an assignment to an immutable variable is legal iff there is no other
881881
assignment bit to that same variable in scope.
882882

883883
## Why is the design made this way?

0 commit comments

Comments
 (0)