Skip to content

Fixed several typos #18989

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
Nov 16, 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 src/doc/guide-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ println!("{}", s[0]);
This does not compile. This is on purpose. In the world of UTF-8, direct
indexing is basically never what you want to do. The reason is that each
character can be a variable number of bytes. This means that you have to iterate
through the characters anyway, which is a O(n) operation.
through the characters anyway, which is an O(n) operation.

There's 3 basic levels of unicode (and its encodings):

Expand Down
12 changes: 6 additions & 6 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2526,7 +2526,7 @@ The currently implemented features of the reference compiler are:

* `plugin_registrar` - Indicates that a crate has [compiler plugins][plugin] that it
wants to load. As with `phase`, the implementation is
in need of a overhaul, and it is not clear that plugins
in need of an overhaul, and it is not clear that plugins
defined using this will continue to work.

* `quote` - Allows use of the `quote_*!` family of macros, which are
Expand Down Expand Up @@ -2583,7 +2583,7 @@ there isn't a parser error first). The directive in this case is no longer
necessary, and it's likely that existing code will break if the feature isn't
removed.

If a unknown feature is found in a directive, it results in a compiler error.
If an unknown feature is found in a directive, it results in a compiler error.
An unknown feature is one which has never been recognized by the compiler.

# Statements and expressions
Expand Down Expand Up @@ -2685,7 +2685,7 @@ When an lvalue is evaluated in an _lvalue context_, it denotes a memory
location; when evaluated in an _rvalue context_, it denotes the value held _in_
that memory location.

When an rvalue is used in lvalue context, a temporary un-named lvalue is
When an rvalue is used in an lvalue context, a temporary un-named lvalue is
created and used instead. A temporary's lifetime equals the largest lifetime
of any reference that points to it.

Expand Down Expand Up @@ -2833,7 +2833,7 @@ foo().x;
```

A field access is an [lvalue](#lvalues,-rvalues-and-temporaries) referring to
the value of that field. When the type providing the field inherits mutabilty,
the value of that field. When the type providing the field inherits mutability,
it can be [assigned](#assignment-expressions) to.

Also, if the type of the expression to the left of the dot is a pointer, it is
Expand Down Expand Up @@ -3321,7 +3321,7 @@ between `_` and `..` is that the pattern `C(_)` is only type-correct if `C` has
exactly one argument, while the pattern `C(..)` is type-correct for any enum
variant `C`, regardless of how many arguments `C` has.

Used inside a array pattern, `..` stands for any number of elements, when the
Used inside an array pattern, `..` stands for any number of elements, when the
`advanced_slice_patterns` feature gate is turned on. This wildcard can be used
at most once for a given array, which implies that it cannot be used to
specifically match elements that are at an unknown distance from both ends of a
Expand Down Expand Up @@ -3584,7 +3584,7 @@ is not a surrogate), represented as a 32-bit unsigned word in the 0x0000 to
0xD7FF or 0xE000 to 0x10FFFF range. A `[char]` array is effectively an UCS-4 /
UTF-32 string.

A value of type `str` is a Unicode string, represented as a array of 8-bit
A value of type `str` is a Unicode string, represented as an array of 8-bit
unsigned bytes holding a sequence of UTF-8 codepoints. Since `str` is of
unknown size, it is not a _first class_ type, but can only be instantiated
through a pointer type, such as `&str` or `String`.
Expand Down