'iff' for docs to 'if and only if'
This commit is contained in:
parent
492f33a267
commit
dad8cd19d3
17 changed files with 25 additions and 25 deletions
2
src/libbacktrace/aclocal.m4
vendored
2
src/libbacktrace/aclocal.m4
vendored
|
@ -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,
|
||||
# if we strip the leading $srcdir from $ac_aux_dir. That would be:
|
||||
# iff 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"
|
||||
|
|
|
@ -69,7 +69,7 @@ typedef void (*htab_del) (void *);
|
|||
typedef int (*htab_trav) (void **, void *);
|
||||
|
||||
/* Memory-allocation function, with the same functionality as calloc().
|
||||
If it returns NULL, the hash table implementation will pass an error
|
||||
Iff 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);
|
||||
|
|
|
@ -1059,7 +1059,7 @@ $opt_help || {
|
|||
|
||||
|
||||
# func_lalib_p file
|
||||
# True if FILE is a libtool `.la' library or `.lo' object file.
|
||||
# True iff 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 if FILE is a libtool `.la' library or `.lo' object file.
|
||||
# True iff 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 if FILE is a libtool wrapper script
|
||||
# True iff 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 if FILE is a libtool wrapper executable
|
||||
# True iff 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 if FILE is a libtool wrapper script or wrapper executable
|
||||
# True iff 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 ()
|
||||
|
|
|
@ -108,7 +108,7 @@ impl<T> VecDeque<T> {
|
|||
ptr::write(self.ptr.offset(off as isize), t);
|
||||
}
|
||||
|
||||
/// Returns true if the buffer is at capacity
|
||||
/// Returns true if and only if the buffer is at capacity
|
||||
#[inline]
|
||||
fn is_full(&self) -> bool { self.cap - self.len() == 1 }
|
||||
|
||||
|
|
|
@ -1126,7 +1126,7 @@ macro_rules! uint_impl {
|
|||
acc
|
||||
}
|
||||
|
||||
/// Returns `true` if `self == 2^k` for some `k`.
|
||||
/// Returns `true` if and only if `self == 2^k` for some `k`.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[inline]
|
||||
pub fn is_power_of_two(self) -> bool {
|
||||
|
|
|
@ -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 if for all i with 0 <= i <= |x| - p - 1, we have x[i] == x[i+p].
|
||||
*period* for x iff 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.
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ impl IndependentSample<f64> for GammaLargeShape {
|
|||
loop {
|
||||
let StandardNormal(x) = rng.gen::<StandardNormal>();
|
||||
let v_cbrt = 1.0 + self.c * x;
|
||||
if v_cbrt <= 0.0 { // a^3 <= 0 if a <= 0
|
||||
if v_cbrt <= 0.0 { // a^3 <= 0 iff a <= 0
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -509,9 +509,9 @@ pub struct ItemVariances {
|
|||
|
||||
#[derive(Clone, PartialEq, RustcDecodable, RustcEncodable, Copy)]
|
||||
pub enum Variance {
|
||||
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
|
||||
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
|
||||
Bivariant, // T<A> <: T<B> -- e.g., unused type parameter
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ impl<'v, P> Visitor<'v> for LoopQueryVisitor<P> where P: FnMut(&ast::Expr_) -> b
|
|||
}
|
||||
}
|
||||
|
||||
// Takes a predicate p, returns true if p is true for any subexpressions
|
||||
// Takes a predicate p, returns true iff 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 @@ impl<'v, P> Visitor<'v> for BlockQueryVisitor<P> where P: FnMut(&ast::Expr) -> b
|
|||
}
|
||||
}
|
||||
|
||||
// Takes a predicate p, returns true if p is true for any subexpressions
|
||||
// Takes a predicate p, returns true iff 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 {
|
||||
|
|
|
@ -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 if there is no other
|
||||
an assignment to an immutable variable is legal iff there is no other
|
||||
assignment bit to that same variable in scope.
|
||||
|
||||
## Why is the design made this way?
|
||||
|
|
|
@ -1319,7 +1319,7 @@ impl<'a, 'tcx, 'v> Visitor<'v> for VisiblePrivateTypesVisitor<'a, 'tcx> {
|
|||
|
||||
// miscellaneous info about the impl
|
||||
|
||||
// `true` if this is `impl Private for ...`.
|
||||
// `true` iff 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 @@ impl<'a, 'tcx, 'v> Visitor<'v> for VisiblePrivateTypesVisitor<'a, 'tcx> {
|
|||
!is_local(did) || self.trait_is_public(did.node)
|
||||
});
|
||||
|
||||
// `true` if this is a trait impl or at least one method is public.
|
||||
// `true` iff this is a trait impl or at least one method is public.
|
||||
//
|
||||
// `impl Public { $( fn ...() {} )* }` is not visible.
|
||||
//
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
//! this case, because the `Self` parameter is contravariant and `A` is
|
||||
//! covariant, it means that:
|
||||
//!
|
||||
//! V_O <: V_S if
|
||||
//! V_O <: V_S iff
|
||||
//! int <: int
|
||||
//! String <: Object
|
||||
//!
|
||||
|
|
|
@ -104,7 +104,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
// Return char and advance if next char is equal to requested
|
||||
// Return char and advance iff next char is equal to requested
|
||||
fn read_given_char(&mut self, c: char) -> Option<char> {
|
||||
self.read_atomically(|p| {
|
||||
match p.read_char() {
|
||||
|
|
|
@ -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 if it has a
|
||||
// hack: a matcher sequence is repeating iff it has a
|
||||
// parent (the top level is just a container)
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// variance inference works in the first place.
|
||||
|
||||
// This is contravariant with respect to 'a, meaning that
|
||||
// Contravariant<'long> <: Contravariant<'short> if
|
||||
// Contravariant<'long> <: Contravariant<'short> iff
|
||||
// 'short <= 'long
|
||||
struct Contravariant<'a> {
|
||||
f: &'a isize
|
||||
|
|
|
@ -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 if the instances shortcircuit.
|
||||
// second element, so this passes iff the instances shortcircuit.
|
||||
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
|
|
@ -24,7 +24,7 @@ struct Covariant<'a> {
|
|||
}
|
||||
|
||||
fn use_<'a>(c: Covariant<'a>) {
|
||||
// OK Because Covariant<'a> <: Covariant<'static> if 'a <= 'static
|
||||
// OK Because Covariant<'a> <: Covariant<'static> iff 'a <= 'static
|
||||
let _: Covariant<'static> = c;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue