Skip to content

Commit c433f5e

Browse files
committed
A couple of sentence edits for grammar, and some line length tweaks for
consistency (80-character limit).
1 parent 824c9eb commit c433f5e

File tree

13 files changed

+107
-79
lines changed

13 files changed

+107
-79
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing to Rust
22

33
Thank you for your interest in contributing to Rust! There are many ways to
4-
contribute, and we appreciate all of them. This document is a bit long, so here's
5-
links to the major sections:
4+
contribute, and we appreciate all of them. This document is a bit long, so here
5+
are links to the major sections:
66

77
* [Feature Requests](#feature-requests)
88
* [Bug Reports](#bug-reports)
@@ -13,10 +13,11 @@ links to the major sections:
1313
* [Out-of-tree Contributions](#out-of-tree-contributions)
1414
* [Helpful Links and Information](#helpful-links-and-information)
1515

16-
If you have questions, please make a post on [internals.rust-lang.org][internals] or
17-
hop on [#rust-internals][pound-rust-internals].
16+
If you have questions, please make a post on [internals.rust-lang.org][internals]
17+
or hop on [#rust-internals][pound-rust-internals].
1818

19-
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
19+
As a reminder, all contributors are expected to follow our
20+
[Code of Conduct][coc].
2021

2122
[pound-rust-internals]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
2223
[internals]: https://internals.rust-lang.org
@@ -35,14 +36,15 @@ While bugs are unfortunate, they're a reality in software. We can't fix what we
3536
don't know about, so please report liberally. If you're not sure if something
3637
is a bug or not, feel free to file a bug anyway.
3738

38-
**If you believe reporting your bug publicly represents a security risk to Rust users,
39-
please follow our [instructions for reporting security vulnerabilities](https://www.rust-lang.org/security.html)**.
39+
**If you believe reporting your bug publicly represents a security risk to Rust
40+
users, please follow our [instructions for reporting security vulnerabilities]
41+
(https://www.rust-lang.org/security.html)**.
4042

4143
If you have the chance, before reporting a bug, please [search existing
4244
issues](https://github.com/rust-lang/rust/search?q=&type=Issues&utf8=%E2%9C%93),
4345
as it's possible that someone else has already reported your error. This doesn't
44-
always work, and sometimes it's hard to know what to search for, so consider this
45-
extra credit. We won't mind if you accidentally file a duplicate report.
46+
always work, and sometimes it's hard to know what to search for, so consider
47+
this extra credit. We won't mind if you accidentally file a duplicate report.
4648

4749
Opening an issue is as easy as following [this
4850
link](https://github.com/rust-lang/rust/issues/new) and filling out the fields.
@@ -126,9 +128,9 @@ file. If you still have a `config.mk` file in your directory - from
126128

127129
### Building
128130

129-
The build system uses the `x.py` script to control the build process. This script
130-
is used to build, test, and document various parts of the compiler. You can
131-
execute it as:
131+
The build system uses the `x.py` script to control the build process. This
132+
script is used to build, test, and document various parts of the compiler. You
133+
can execute it as:
132134

133135
```sh
134136
python x.py build
@@ -315,10 +317,10 @@ To find documentation-related issues, sort by the [A-docs label][adocs].
315317

316318
[adocs]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-docs
317319

318-
In many cases, you don't need a full `./x.py doc`. You can use `rustdoc` directly
319-
to check small fixes. For example, `rustdoc src/doc/reference.md` will render
320-
reference to `doc/reference.html`. The CSS might be messed up, but you can
321-
verify that the HTML is right.
320+
In many cases, you don't need a full `./x.py doc`. You can use `rustdoc`
321+
directly to check small fixes. For example, `rustdoc src/doc/reference.md` will
322+
render reference to `doc/reference.html`. The CSS might be messed up, but you
323+
can verify that the HTML is right.
322324

323325
## Issue Triage
324326

COPYRIGHT

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ terms.
66

77
Longer version:
88

9-
The Rust Project is copyright 2010, The Rust Project
10-
Developers.
9+
The Rust Project is copyright 2010, The Rust Project Developers.
1110

1211
Licensed under the Apache License, Version 2.0
1312
<LICENSE-APACHE or
@@ -270,9 +269,9 @@ their own copyright notices and license terms:
270269
modification, are permitted provided that the following conditions are met:
271270
1. Redistributions of source code must retain the above copyright notice(s),
272271
this list of conditions and the following disclaimer.
273-
2. Redistributions in binary form must reproduce the above copyright notice(s),
274-
this list of conditions and the following disclaimer in the documentation
275-
and/or other materials provided with the distribution.
272+
2. Redistributions in binary form must reproduce the above copyright
273+
notice(s), this list of conditions and the following disclaimer in the
274+
documentation and/or other materials provided with the distribution.
276275

277276
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S)
278277
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,

RELEASES.md

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ Cargo
305305
* [Fix retrying crate downloads for network errors][cargo/3348]
306306
* [Implement string lookup for `build.rustflags` config key][cargo/3356]
307307
* [Emit more info on --message-format=json][cargo/3319]
308-
* [Assume `build.rs` in the same directory as `Cargo.toml` is a build script][cargo/3361]
308+
* [Assume `build.rs` in the same directory as `Cargo.toml` is a build
309+
script][cargo/3361]
309310
* [Don't ignore errors in workspace manifest][cargo/3409]
310311
* [Fix `--message-format JSON` when rustc emits non-JSON warnings][cargo/3410]
311312

@@ -330,8 +331,8 @@ Misc
330331
* [Rust supports i686-unknown-openbsd][38086]. Tier 3 support. No testing or
331332
releases.
332333
* [Rust supports the MSP430][37627]. Tier 3 support. No testing or releases.
333-
* [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing or
334-
releases.
334+
* [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing
335+
or releases.
335336

336337
Compatibility Notes
337338
-------------------
@@ -923,13 +924,16 @@ Version 1.12.1 (2016-10-20)
923924
Regression Fixes
924925
----------------
925926

926-
* [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381][36381]
927+
* [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_
928+
for_trans()' #36381][36381]
927929
* [Confusion with double negation and booleans][36856]
928930
* [rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)][36875]
929931
* [Rustc 1.12.0 Windows build of `ethcore` crate fails with LLVM error][36924]
930-
* [1.12.0: High memory usage when linking in release mode with debug info][36926]
932+
* [1.12.0: High memory usage when linking in release mode with debug
933+
info][36926]
931934
* [Corrupted memory after updated to 1.12][36936]
932-
* ["Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"][37026]
935+
* ["Let NullaryConstructor = something;" causes internal compiler error: "tried
936+
to overwrite interned AdtDef"][37026]
933937
* [Fix ICE: inject bitcast if types mismatch for invokes/calls/stores][37112]
934938
* [debuginfo: Handle spread_arg case in MIR-trans in a more stable way.][37153]
935939

@@ -1165,7 +1169,7 @@ Tooling
11651169
* [Test binaries now support a `--test-threads` argument to specify the number
11661170
of threads used to run tests, and which acts the same as the
11671171
`RUST_TEST_THREADS` environment variable]
1168-
(https://github.com/rust-lang/rust/pull/35414)
1172+
(https://github.com/rust-lang/rust/pull/35414)
11691173
* [The test runner now emits a warning when tests run over 60 seconds]
11701174
(https://github.com/rust-lang/rust/pull/35405)
11711175
* [rustdoc: Fix methods in search results]
@@ -2217,15 +2221,22 @@ Libraries
22172221
be the same length
22182222
* `<[T]>::`[`sort_by_key`]
22192223
* checked, saturated, and overflowing operations
2220-
* [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
2224+
* [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`],
2225+
[`i32::checked_shr`]
22212226
* [`i32::saturating_mul`]
2222-
* [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
2223-
* [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
2224-
* [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
2227+
* [`i32::overflowing_add`], [`i32::overflowing_sub`],
2228+
[`i32::overflowing_mul`], [`i32::overflowing_div`]
2229+
* [`i32::overflowing_rem`], [`i32::overflowing_neg`],
2230+
[`i32::overflowing_shl`], [`i32::overflowing_shr`]
2231+
* [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`],
2232+
[`u32::checked_shl`]
22252233
* [`u32::saturating_mul`]
2226-
* [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
2227-
* [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
2228-
* and checked, saturated, and overflowing operations for other primitive types
2234+
* [`u32::overflowing_add`], [`u32::overflowing_sub`],
2235+
[`u32::overflowing_mul`], [`u32::overflowing_div`]
2236+
* [`u32::overflowing_rem`], [`u32::overflowing_neg`],
2237+
[`u32::overflowing_shl`], [`u32::overflowing_shr`]
2238+
* and checked, saturated, and overflowing operations for other primitive
2239+
types
22292240
* FFI
22302241
* [`ffi::IntoStringError`]
22312242
* [`CString::into_string`]
@@ -3321,7 +3332,8 @@ Highlights
33213332
access to all underlying information.
33223333
* The compiler now contains extended explanations of many errors. When an error
33233334
with an explanation occurs the compiler suggests using the `--explain` flag
3324-
to read the explanation. Error explanations are also [available online][err-index].
3335+
to read the explanation. Error explanations are also
3336+
[available online][err-index].
33253337
* Thanks to multiple [improvements][sk] to [type checking][pre], as
33263338
well as other work, the time to bootstrap the compiler decreased by
33273339
32%.
@@ -4156,7 +4168,8 @@ Version 0.10 (2014-04-03)
41564168
* Trailing commas are now allowed in argument lists and tuple patterns.
41574169
* The `do` keyword has been removed, it is now a reserved keyword.
41584170
* Default type parameters have been implemented, but are feature gated.
4159-
* Borrowed variables through captures in closures are now considered soundly.
4171+
* Borrowed variables through captures in closures are now considered
4172+
soundly.
41604173
* `extern mod` is now `extern crate`
41614174
* The `Freeze` trait has been removed.
41624175
* The `Share` trait has been added for types that can be shared among
@@ -4187,8 +4200,8 @@ Version 0.10 (2014-04-03)
41874200
* std: The `vec` module has been renamed to `slice`.
41884201
* std: A new vector type, `Vec<T>`, has been added in preparation for DST.
41894202
This will become the only growable vector in the future.
4190-
* std: `std::io` now has more public-reexports. Types such as `BufferedReader`
4191-
are now found at `std::io::BufferedReader` instead of
4203+
* std: `std::io` now has more public-reexports. Types such as
4204+
`BufferedReader` are now found at `std::io::BufferedReader` instead of
41924205
`std::io::buffered::BufferedReader`.
41934206
* std: `print` and `println` are no longer in the prelude, the `print!` and
41944207
`println!` macros are intended to be used instead.
@@ -4210,7 +4223,8 @@ Version 0.10 (2014-04-03)
42104223
can be found on the wiki's style guide.
42114224
* std: `eof()` has been removed from the `Reader` trait. Specific types may
42124225
still implement the function.
4213-
* std: Networking types are now cloneable to allow simultaneous reads/writes.
4226+
* std: Networking types are now cloneable to allow simultaneous
4227+
reads/writes.
42144228
* std: `assert_approx_eq!` has been removed
42154229
* std: The `e` and `E` formatting specifiers for floats have been added to
42164230
print them in exponential notation.
@@ -4331,24 +4345,25 @@ Version 0.9 (2014-01-09)
43314345
* Comments may be nested.
43324346
* Values automatically coerce to trait objects they implement, without
43334347
an explicit `as`.
4334-
* Enum discriminants are no longer an entire word but as small as needed to
4335-
contain all the variants. The `repr` attribute can be used to override
4336-
the discriminant size, as in `#[repr(int)]` for integer-sized, and
4337-
`#[repr(C)]` to match C enums.
4348+
* Enum discriminants are no longer an entire word but as small as needed
4349+
to contain all the variants. The `repr` attribute can be used to
4350+
override the discriminant size, as in `#[repr(int)]` for integer-sized,
4351+
and `#[repr(C)]` to match C enums.
43384352
* Non-string literals are not allowed in attributes (they never worked).
43394353
* The FFI now supports variadic functions.
43404354
* Octal numeric literals, as in `0o7777`.
4341-
* The `concat!` syntax extension performs compile-time string concatenation.
4355+
* The `concat!` syntax extension performs compile-time string
4356+
concatenation.
43424357
* The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
43434358
removed as Rust no longer uses segmented stacks.
43444359
* Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
4345-
* Ignoring all fields of an enum variant or tuple-struct is done with `..`,
4346-
not `*`; ignoring remaining fields of a struct is also done with `..`,
4347-
not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
4360+
* Ignoring all fields of an enum variant or tuple-struct is done with
4361+
`..`, not `*`; ignoring remaining fields of a struct is also done with
4362+
`..`, not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
43484363
* `rustc` supports the "win64" calling convention via `extern "win64"`.
43494364
* `rustc` supports the "system" calling convention, which defaults to the
4350-
preferred convention for the target platform, "stdcall" on 32-bit Windows,
4351-
"C" elsewhere.
4365+
preferred convention for the target platform, "stdcall" on 32-bit
4366+
Windows, "C" elsewhere.
43524367
* The `type_overflow` lint (default: warn) checks literals for overflow.
43534368
* The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
43544369
* The `attribute_usage` lint (default: warn) warns about unknown

src/doc/book/src/SUMMARY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
* [FFI](ffi.md)
5454
* [Borrow and AsRef](borrow-and-asref.md)
5555
* [Release Channels](release-channels.md)
56-
* [Using Rust without the standard library](using-rust-without-the-standard-library.md)
56+
* [Using Rust without the standard
57+
library](using-rust-without-the-standard-library.md)
5758
* [Procedural Macros (and custom derive)](procedural-macros.md)
5859
* [Glossary](glossary.md)
5960
* [Syntax Index](syntax-index.md)

src/doc/book/src/strings.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ Usually, access to a vector with `[]` is very fast. But, because each character
106106
in a UTF-8 encoded string can be multiple bytes, you have to walk over the
107107
string to find the nᵗʰ letter of a string. This is a significantly more
108108
expensive operation, and we don’t want to be misleading. Furthermore, ‘letter’
109-
isn’t something defined in Unicode, exactly. We can choose to look at a string as
110-
individual bytes, or as codepoints:
109+
isn’t something defined in Unicode, exactly. We can choose to look at a string
110+
as individual bytes, or as codepoints:
111111

112112
```rust
113113
let hachiko = "忠犬ハチ公";
@@ -163,8 +163,8 @@ let hachi = &dog[0..2];
163163
with this error:
164164

165165
```text
166-
thread 'main' panicked at 'byte index 2 is not a char boundary; it is inside '忠'
167-
(bytes 0..3) of `忠犬ハチ公`'
166+
thread 'main' panicked at 'byte index 2 is not a char boundary; it is inside
167+
'忠' (bytes 0..3) of `忠犬ハチ公`'
168168
```
169169

170170
## Concatenation

src/doc/book/src/traits.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ impl Circle {
2323
[methodsyntax]: method-syntax.html
2424

2525
Traits are similar, except that we first define a trait with a method
26-
signature, then implement the trait for a type. In this example, we implement the trait `HasArea` for `Circle`:
26+
signature, then implement the trait for a type. In this example, we implement
27+
the trait `HasArea` for `Circle`:
2728

2829
```rust
2930
struct Circle {
@@ -78,8 +79,8 @@ impl HasArea for Circle {
7879
## Trait bounds on generic functions
7980

8081
Traits are useful because they allow a type to make certain promises about its
81-
behavior. Generic functions can exploit this to constrain, or [bound][bounds], the types they
82-
accept. Consider this function, which does not compile:
82+
behavior. Generic functions can exploit this to constrain, or [bound][bounds],
83+
the types they accept. Consider this function, which does not compile:
8384

8485
[bounds]: glossary.html#bounds
8586

@@ -427,13 +428,16 @@ fn inverse<T>(x: i32) -> T
427428
```
428429

429430
This shows off the additional feature of `where` clauses: they allow bounds
430-
on the left-hand side not only of type parameters `T`, but also of types (`i32` in this case). In this example, `i32` must implement
431+
on the left-hand side not only of type parameters `T`, but also of types
432+
(`i32` in this case). In this example, `i32` must implement
431433
`ConvertTo<T>`. Rather than defining what `i32` is (since that's obvious), the
432434
`where` clause here constrains `T`.
433435

434436
# Default methods
435437

436-
A default method can be added to a trait definition if it is already known how a typical implementor will define a method. For example, `is_invalid()` is defined as the opposite of `is_valid()`:
438+
A default method can be added to a trait definition if it is already known how
439+
a typical implementor will define a method. For example, `is_invalid()` is
440+
defined as the opposite of `is_valid()`:
437441

438442
```rust
439443
trait Foo {
@@ -443,7 +447,9 @@ trait Foo {
443447
}
444448
```
445449

446-
Implementors of the `Foo` trait need to implement `is_valid()` but not `is_invalid()` due to the added default behavior. This default behavior can still be overridden as in:
450+
Implementors of the `Foo` trait need to implement `is_valid()` but not
451+
`is_invalid()` due to the added default behavior. This default behavior can
452+
still be overridden as in:
447453

448454
```rust
449455
# trait Foo {

src/doc/book/src/unsized-types.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
Most types have a particular size, in bytes, that is knowable at compile time.
44
For example, an `i32` is thirty-two bits big, or four bytes. However, there are
5-
some types which are useful to express, but do not have a defined size. These are
6-
called ‘unsized’ or ‘dynamically sized’ types. One example is `[T]`. This type
7-
represents a certain number of `T` in sequence. But we don’t know how many
5+
some types which are useful to express, but do not have a defined size. These
6+
are called ‘unsized’ or ‘dynamically sized’ types. One example is `[T]`. This
7+
type represents a certain number of `T` in sequence. But we don’t know how many
88
there are, so the size is not known.
99

1010
Rust understands a few of these types, but they have some restrictions. There

src/doc/book/src/variable-bindings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@ println!("{}", x); // Prints "42".
241241
Shadowing and mutable bindings may appear as two sides of the same coin, but
242242
they are two distinct concepts that can't always be used interchangeably. For
243243
one, shadowing enables us to rebind a name to a value of a different type. It
244-
is also possible to change the mutability of a binding. Note that shadowing a
244+
is also possible to change the mutability of a binding. Note that shadowing a
245245
name does not alter or destroy the value it was bound to, and the value will
246-
continue to exist until it goes out of scope, even if it is no longer accessible
247-
by any means.
246+
continue to exist until it goes out of scope, even if it is no longer
247+
accessible by any means.
248248

249249
```rust
250250
let mut x: i32 = 1;

src/doc/book/src/vectors.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,10 @@ for i in v {
115115
}
116116
```
117117

118-
Note: You cannot use the vector again once you have iterated by taking ownership of the vector.
119-
You can iterate the vector multiple times by taking a reference to the vector whilst iterating.
120-
For example, the following code does not compile.
118+
Note: You cannot use the vector again once you have iterated by taking
119+
ownership of the vector. You can iterate the vector multiple times by taking a
120+
reference to the vector whilst iterating. For example, the following code does
121+
not compile.
121122

122123
```rust,ignore
123124
let v = vec![1, 2, 3, 4, 5];

0 commit comments

Comments
 (0)