Skip to content

Fix a/an typos #13886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Version 0.10 (April 2014)
documentation index page.
* std: `std::condition` has been removed. All I/O errors are now propagated
through the `Result` type. In order to assist with error handling, a
`try!` macro for unwrapping errors with an early return and an lint for
`try!` macro for unwrapping errors with an early return and a lint for
unused results has been added. See #12039 for more information.
* std: The `vec` module has been renamed to `slice`.
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.
Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-lifetimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ process is called *rooting*.
The previous example demonstrated *rooting*, the process by which the
compiler ensures that managed boxes remain live for the duration of a
borrow. Unfortunately, rooting does not work for borrows of owned
boxes, because it is not possible to have two references to a owned
boxes, because it is not possible to have two references to an owned
box.

For owned boxes, therefore, the compiler will only allow a borrow *if
Expand Down Expand Up @@ -462,7 +462,7 @@ of a `f64` as if it were a struct with two fields would be a memory
safety violation.

So, in fact, for every `ref` binding, the compiler will impose the
same rules as the ones we saw for borrowing the interior of a owned
same rules as the ones we saw for borrowing the interior of an owned
box: it must be able to guarantee that the `enum` will not be
overwritten for the duration of the borrow. In fact, the compiler
would accept the example we gave earlier. The example is safe because
Expand Down
2 changes: 1 addition & 1 deletion src/doc/guide-unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ standard library types, e.g. `Cell` and `RefCell`, that provide inner
mutability by replacing compile time guarantees with dynamic checks at
runtime.

An `&mut` reference has a stronger requirement: when a object has an
An `&mut` reference has a stronger requirement: when an object has an
`&mut T` pointing into it, then that `&mut` reference must be the only
such usable path to that object in the whole program. That is, an
`&mut` cannot alias with any other references.
Expand Down
6 changes: 3 additions & 3 deletions src/doc/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Comments in Rust code follow the general C++ style of line and block-comment for
with no nesting of block-comment delimiters.

Line comments beginning with exactly _three_ slashes (`///`), and block
comments beginning with a exactly one repeated asterisk in the block-open
comments beginning with exactly one repeated asterisk in the block-open
sequence (`/**`), are interpreted as a special syntax for `doc`
[attributes](#attributes). That is, they are equivalent to writing
`#[doc="..."]` around the body of the comment (this includes the comment
Expand Down Expand Up @@ -365,7 +365,7 @@ of integer literal suffix:
give the literal the corresponding machine type.

The type of an _unsuffixed_ integer literal is determined by type inference.
If a integer type can be _uniquely_ determined from the surrounding program
If an integer type can be _uniquely_ determined from the surrounding program
context, the unsuffixed integer literal has that type. If the program context
underconstrains the type, the unsuffixed integer literal's type is `int`; if
the program context overconstrains the type, it is considered a static type
Expand Down Expand Up @@ -2184,7 +2184,7 @@ Supported traits for `deriving` are:
* `Hash`, to iterate over the bytes in a data type.
* `Rand`, to create a random instance of a data type.
* `Default`, to create an empty instance of a data type.
* `Zero`, to create an zero instance of a numeric data type.
* `Zero`, to create a zero instance of a numeric data type.
* `FromPrimitive`, to create an instance from a numeric primitive.
* `Show`, to format a value using the `{}` formatter.

Expand Down
2 changes: 1 addition & 1 deletion src/doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -2980,7 +2980,7 @@ fn main() {
}
~~~

In general, `use` creates an local alias:
In general, `use` creates a local alias:
An alternate path and a possibly different name to access the same item,
without touching the original, and with both being interchangeable.

Expand Down
2 changes: 1 addition & 1 deletion src/etc/zsh/_rust
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ _rustc_opts_lint=(
'unsafe-block[usage of an `unsafe` block]'
'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
'unused-imports[imports that are never used]'
'unused-must-use[unused result of an type flagged as #\[must_use\]]'
'unused-must-use[unused result of a type flagged as #\[must_use\]]'
"unused-mut[detect mut variables which don't need to be mutable]"
'unused-result[unused result of an expression in a statement]'
'unused-unsafe[unnecessary use of an `unsafe` block]'
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
// If you opted in to dynamic linking and we decided to emit a
// static output, you should probably be notified of such an event!
sess.warn("dynamic linking was preferred, but dependencies \
could not all be found in an dylib format.");
could not all be found in a dylib format.");
sess.warn("linking statically instead, using rlibs");
add_static_crates(args, sess, tmpdir, deps)
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3639,7 +3639,7 @@ pub fn check_enum_variants(ccx: &CrateCtxt,
let declty = ty::mk_int_var(ccx.tcx, fcx.infcx().next_int_var_id());
check_const_with_ty(&fcx, e.span, e, declty);
// check_expr (from check_const pass) doesn't guarantee
// that the expression is in an form that eval_const_expr can
// that the expression is in a form that eval_const_expr can
// handle, so we may still get an internal compiler error

match const_eval::eval_const_expr_partial(ccx.tcx, e) {
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/middle/typeck/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) {
}
}
ty::AutoObject(ty::RegionTraitStore(trait_region, _), _, _, _) => {
// Determine if we are casting `expr` to an trait
// Determine if we are casting `expr` to a trait
// instance. If so, we have to be sure that the type of
// the source obeys the trait's region bound.
//
Expand Down Expand Up @@ -524,7 +524,7 @@ fn visit_expr(rcx: &mut Rcx, expr: &ast::Expr) {
}

ast::ExprCast(source, _) => {
// Determine if we are casting `source` to an trait
// Determine if we are casting `source` to a trait
// instance. If so, we have to be sure that the type of
// the source obeys the trait's region bound.
//
Expand Down
4 changes: 2 additions & 2 deletions src/libserialize/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -813,13 +813,13 @@ impl<E: ::Encoder<S>, S> Encodable<E, S> for Json {
}

impl Json {
/// Encodes a json value into a io::writer. Uses a single line.
/// Encodes a json value into an io::writer. Uses a single line.
pub fn to_writer(&self, wr: &mut io::Writer) -> EncodeResult {
let mut encoder = Encoder::new(wr);
self.encode(&mut encoder)
}

/// Encodes a json value into a io::writer.
/// Encodes a json value into an io::writer.
/// Pretty-prints in a more readable format.
pub fn to_pretty_writer(&self, wr: &mut io::Writer) -> EncodeResult {
let mut encoder = PrettyEncoder::new(wr);
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ pub trait Writer {
self.write([n])
}

/// Write a i8 (1 byte).
/// Write an i8 (1 byte).
fn write_i8(&mut self, n: i8) -> IoResult<()> {
self.write([n as u8])
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub unsafe fn position<T>(buf: *T, f: |&T| -> bool) -> uint {
}
}

/// Create an null pointer.
/// Create a null pointer.
///
/// # Example
///
Expand Down
2 changes: 1 addition & 1 deletion src/test/run-pass/shape_intrinsic_tag_then_rec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#![feature(managed_boxes)]

// Exercises a bug in the shape code that was exposed
// on x86_64: when there is a enum embedded in an
// on x86_64: when there is an enum embedded in an
// interior record which is then itself interior to
// something else, shape calculations were off.

Expand Down