auto merge of #13653 : jbcrail/rust/fix-comment-mistakes, r=alexcrichton
This commit is contained in:
commit
c46c7607a4
33 changed files with 53 additions and 53 deletions
|
|
@ -1171,7 +1171,7 @@ fn link_args(sess: &Session,
|
|||
// actually creates "invalid" objects [1] [2], but only for some
|
||||
// introspection tools, not in terms of whether it can be loaded.
|
||||
//
|
||||
// Long story shory, passing this flag forces the linker to *not*
|
||||
// Long story short, passing this flag forces the linker to *not*
|
||||
// truncate section names (so we can find the metadata section after
|
||||
// it's compiled). The real kicker is that rust compiled just fine on
|
||||
// windows for quite a long time *without* this flag, so I have no idea
|
||||
|
|
@ -1491,7 +1491,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
|
|||
}
|
||||
|
||||
// Link in all of our upstream crates' native dependencies. Remember that
|
||||
// all of these upstream native depenencies are all non-static
|
||||
// all of these upstream native dependencies are all non-static
|
||||
// dependencies. We've got two cases then:
|
||||
//
|
||||
// 1. The upstream crate is an rlib. In this case we *must* link in the
|
||||
|
|
@ -1509,7 +1509,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
|
|||
// be instantiated in the target crate, meaning that the native symbol must
|
||||
// also be resolved in the target crate.
|
||||
fn add_upstream_native_libraries(args: &mut Vec<~str>, sess: &Session) {
|
||||
// Be sure to use a topological sorting of crates becuase there may be
|
||||
// Be sure to use a topological sorting of crates because there may be
|
||||
// interdependencies between native libraries. When passing -nodefaultlibs,
|
||||
// for example, almost all native libraries depend on libc, so we have to
|
||||
// make sure that's all the way at the right (liblibc is near the base of
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
//! such.
|
||||
//!
|
||||
//! The core of this problem is when an upstream dependency changes and
|
||||
//! downstream dependants are not recompiled. This causes compile errors because
|
||||
//! downstream dependents are not recompiled. This causes compile errors because
|
||||
//! the upstream crate's metadata has changed but the downstream crates are
|
||||
//! still referencing the older crate's metadata.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ impl<'a> Context<'a> {
|
|||
//
|
||||
// A Library candidate is created if the metadata for the set of
|
||||
// libraries corresponds to the crate id and hash criteria that this
|
||||
// serach is being performed for.
|
||||
// search is being performed for.
|
||||
let mut libraries = Vec::new();
|
||||
for (_hash, (rlibs, dylibs)) in candidates.move_iter() {
|
||||
let mut metadata = None;
|
||||
|
|
@ -278,7 +278,7 @@ impl<'a> Context<'a> {
|
|||
// rlib/dylib).
|
||||
//
|
||||
// The return value is `None` if `file` doesn't look like a rust-generated
|
||||
// library, or if a specific version was requested and it doens't match the
|
||||
// library, or if a specific version was requested and it doesn't match the
|
||||
// apparent file's version.
|
||||
//
|
||||
// If everything checks out, then `Some(hash)` is returned where `hash` is
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ fn create_and_seed_worklist(tcx: &ty::ctxt,
|
|||
None => ()
|
||||
}
|
||||
|
||||
// Seed implemeneted trait methods
|
||||
// Seed implemented trait methods
|
||||
let mut life_seeder = LifeSeeder {
|
||||
worklist: worklist
|
||||
};
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ fn visit_expr(ir: &mut IrMaps, expr: &Expr) {
|
|||
// var must be dead afterwards
|
||||
moves::CapMove => true,
|
||||
|
||||
// var can stil be used
|
||||
// var can still be used
|
||||
moves::CapCopy | moves::CapRef => false
|
||||
};
|
||||
call_caps.push(CaptureInfo {ln: cv_ln,
|
||||
|
|
@ -613,7 +613,7 @@ impl<'a> Liveness<'a> {
|
|||
f: |&mut Liveness<'a>, LiveNode, Variable, Span, NodeId|) {
|
||||
// only consider the first pattern; any later patterns must have
|
||||
// the same bindings, and we also consider the first pattern to be
|
||||
// the "authoratative" set of ids
|
||||
// the "authoritative" set of ids
|
||||
if !pats.is_empty() {
|
||||
self.pat_bindings(pats[0], f)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ impl Visitor<()> for ParentVisitor {
|
|||
let prev = self.curparent;
|
||||
match item.node {
|
||||
ast::ItemMod(..) => { self.curparent = item.id; }
|
||||
// Enum variants are parented to the enum definition itself beacuse
|
||||
// Enum variants are parented to the enum definition itself because
|
||||
// they inherit privacy
|
||||
ast::ItemEnum(ref def, _) => {
|
||||
for variant in def.variants.iter() {
|
||||
|
|
@ -1034,7 +1034,7 @@ impl<'a> Visitor<()> for SanePrivacyVisitor<'a> {
|
|||
}
|
||||
|
||||
impl<'a> SanePrivacyVisitor<'a> {
|
||||
/// Validates all of the visibility qualifers placed on the item given. This
|
||||
/// Validates all of the visibility qualifiers placed on the item given. This
|
||||
/// ensures that there are no extraneous qualifiers that don't actually do
|
||||
/// anything. In theory these qualifiers wouldn't parse, but that may happen
|
||||
/// later on down the road...
|
||||
|
|
@ -1262,7 +1262,7 @@ impl<'a> Visitor<()> for VisiblePrivateTypesVisitor<'a> {
|
|||
self_is_public_path = visitor.outer_type_is_public_path;
|
||||
}
|
||||
|
||||
// miscellanous info about the impl
|
||||
// miscellaneous info about the impl
|
||||
|
||||
// `true` iff this is `impl Private for ...`.
|
||||
let not_private_trait =
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ impl RegionMaps {
|
|||
|
||||
// else, locate the innermost terminating scope
|
||||
// if there's one. Static items, for instance, won't
|
||||
// have an enclusing scope, hence no scope will be
|
||||
// have an enclosing scope, hence no scope will be
|
||||
// returned.
|
||||
let mut id = match self.opt_encl_scope(expr_id) {
|
||||
Some(i) => i,
|
||||
|
|
@ -533,7 +533,7 @@ fn resolve_expr(visitor: &mut RegionResolutionVisitor,
|
|||
// the invoked function is actually running* and call.id
|
||||
// represents *the time to prepare the arguments and make the
|
||||
// call*. See the section "Borrows in Calls" borrowck/doc.rs
|
||||
// for an extended explanantion of why this distinction is
|
||||
// for an extended explanation of why this distinction is
|
||||
// important.
|
||||
//
|
||||
// record_superlifetime(new_cx, expr.callee_id);
|
||||
|
|
@ -604,7 +604,7 @@ fn resolve_local(visitor: &mut RegionResolutionVisitor,
|
|||
// (covers cases `expr` borrows an rvalue that is then assigned
|
||||
// to memory (at least partially) owned by the binding)
|
||||
//
|
||||
// Here are some examples hopefully giving an intution where each
|
||||
// Here are some examples hopefully giving an intuition where each
|
||||
// rule comes into play and why:
|
||||
//
|
||||
// Rule A. `let (ref x, ref y) = (foo().x, 44)`. The rvalue `(22, 44)`
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ pub enum LastPrivate {
|
|||
// `use` directives (imports) can refer to two separate definitions in the
|
||||
// type and value namespaces. We record here the last private node for each
|
||||
// and whether the import is in fact used for each.
|
||||
// If the Option<PrivateDep> fields are None, it means there is no defintion
|
||||
// If the Option<PrivateDep> fields are None, it means there is no definition
|
||||
// in that namespace.
|
||||
LastImport{pub value_priv: Option<PrivateDep>,
|
||||
pub value_used: ImportUse,
|
||||
|
|
@ -3610,7 +3610,7 @@ impl<'a> Resolver<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
// n.b. the discr expr gets visted twice.
|
||||
// n.b. the discr expr gets visited twice.
|
||||
// but maybe it's okay since the first time will signal an
|
||||
// error if there is one? -- tjc
|
||||
self.with_type_parameter_rib(HasTypeParameters(generics,
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ impl Subst for ty::Region {
|
|||
substs: &ty::substs,
|
||||
_: Option<Span>) -> ty::Region {
|
||||
// Note: This routine only handles regions that are bound on
|
||||
// type declarationss and other outer declarations, not those
|
||||
// type declarations and other outer declarations, not those
|
||||
// bound in *fn types*. Region substitution of the bound
|
||||
// regions that appear in a function signature is done using
|
||||
// the specialized routine
|
||||
|
|
|
|||
|
|
@ -963,7 +963,7 @@ fn get_options(bcx: &Block, m: &[Match], col: uint) -> Vec<Opt> {
|
|||
if set.iter().any(|l| opt_eq(tcx, l, &val)) {return;}
|
||||
set.push(val);
|
||||
}
|
||||
// Vector comparisions are special in that since the actual
|
||||
// Vector comparisons are special in that since the actual
|
||||
// conditions over-match, we need to be careful about them. This
|
||||
// means that in order to properly handle things in order, we need
|
||||
// to not always merge conditions.
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ pub fn trans_fn_ref_with_vtables(
|
|||
false
|
||||
};
|
||||
|
||||
// Create a monomorphic verison of generic functions
|
||||
// Create a monomorphic version of generic functions
|
||||
if must_monomorphise {
|
||||
// Should be either intra-crate or inlined.
|
||||
assert_eq!(def_id.krate, ast::LOCAL_CRATE);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ use syntax::ast_util;
|
|||
// because the alignment requirements of the bound data affects the
|
||||
// alignment requires of the closure_data struct as a whole. However,
|
||||
// right now this is a non-issue in any case, because the size of the
|
||||
// rust_opaque_box header is always a mutiple of 16-bytes, which is
|
||||
// rust_opaque_box header is always a multiple of 16-bytes, which is
|
||||
// the maximum alignment requirement we ever have to worry about.
|
||||
//
|
||||
// The only reason alignment matters is that, in order to learn what data
|
||||
|
|
|
|||
|
|
@ -2503,7 +2503,7 @@ fn populate_scope_map(cx: &CrateContext,
|
|||
ast::PatIdent(_, ref path_ref, ref sub_pat_opt) => {
|
||||
|
||||
// Check if this is a binding. If so we need to put it on the scope stack and maybe
|
||||
// introduce an articial scope
|
||||
// introduce an artificial scope
|
||||
if pat_util::pat_is_binding(def_map, pat) {
|
||||
|
||||
let ident = ast_util::path_to_ident(path_ref);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ pub fn monomorphic_fn(ccx: &CrateContext,
|
|||
// Static default methods are a little unfortunate, in
|
||||
// that the "internal" and "external" type of them differ.
|
||||
// Internally, the method body can refer to Self, but the
|
||||
// externally visable type of the method has a type param
|
||||
// externally visible type of the method has a type param
|
||||
// inserted in between the trait type params and the
|
||||
// method type params. The substs that we are given are
|
||||
// the proper substs *internally* to the method body, so
|
||||
|
|
|
|||
|
|
@ -2338,7 +2338,7 @@ pub fn is_instantiable(cx: &ctxt, r_ty: t) -> bool {
|
|||
let r = match get(ty).sty {
|
||||
// fixed length vectors need special treatment compared to
|
||||
// normal vectors, since they don't necessarily have the
|
||||
// possibilty to have length zero.
|
||||
// possibility to have length zero.
|
||||
ty_vec(_, Some(0)) => false, // don't need no contents
|
||||
ty_vec(mt, Some(_)) => type_requires(cx, seen, r_ty, mt.ty),
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ pub struct FnCtxt<'a> {
|
|||
//
|
||||
// What we do in such cases is to generate a region variable with
|
||||
// `region_lb` as a lower bound. The regionck pass then adds
|
||||
// other constriants based on how the variable is used and region
|
||||
// other constraints based on how the variable is used and region
|
||||
// inference selects the ultimate value. Finally, borrowck is
|
||||
// charged with guaranteeing that the value whose address was taken
|
||||
// can actually be made to live as long as it needs to live.
|
||||
|
|
@ -2548,7 +2548,7 @@ fn check_expr_with_unifier(fcx: &FnCtxt,
|
|||
ty::mt {ty: t, mutbl: mutability},
|
||||
None)), // Sadly, we know the length
|
||||
// - Some(args.len()) - but
|
||||
// must thow it away or cause
|
||||
// must throw it away or cause
|
||||
// confusion further down the
|
||||
// pipeline. Hopefully we can
|
||||
// remedy this later.
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
// therefore cannot sensibly be mapped to any particular result. By
|
||||
// default, we will leave such variables as is (so you will get back a
|
||||
// variable in your result). The options force_* will cause the
|
||||
// resolution to fail in this case intead, except for the case of
|
||||
// resolution to fail in this case instead, except for the case of
|
||||
// integral variables, which resolve to `int` if forced.
|
||||
//
|
||||
// # resolve_all and force_all
|
||||
|
|
|
|||
|
|
@ -146,14 +146,14 @@ impl FixedBuffer for FixedBuffer64 {
|
|||
}
|
||||
}
|
||||
|
||||
// While we have at least a full buffer size chunks's worth of data, process that data
|
||||
// While we have at least a full buffer size chunk's worth of data, process that data
|
||||
// without copying it into the buffer
|
||||
while input.len() - i >= size {
|
||||
func(input.slice(i, i + size));
|
||||
i += size;
|
||||
}
|
||||
|
||||
// Copy any input data into the buffer. At this point in the method, the ammount of
|
||||
// Copy any input data into the buffer. At this point in the method, the amount of
|
||||
// data left in the input vector will be less than the buffer size and the buffer will
|
||||
// be empty.
|
||||
let input_remaining = input.len() - i;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue