Skip to content

Commit bfacabc

Browse files
committed
Auto merge of rust-lang#32621 - steveklabnik:rollup, r=steveklabnik
Rollup of 7 pull requests - Successful merges: rust-lang#32580, rust-lang#32591, rust-lang#32603, rust-lang#32605, rust-lang#32606, rust-lang#32607, rust-lang#32608 - Failed merges:
2 parents 102a5be + 2ba8606 commit bfacabc

File tree

6 files changed

+24
-24
lines changed

6 files changed

+24
-24
lines changed

COMPILER_TESTS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized too a revision.
80+
Note that not all headers have meaning when customized to a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

src/doc/book/no-stdlib.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn start(_argc: isize, _argv: *const *const u8) -> isize {
3838
// for a bare-bones hello world. These are normally
3939
// provided by libstd.
4040
#[lang = "eh_personality"] extern fn eh_personality() {}
41-
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
41+
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
4242
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
4343
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
4444
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}
@@ -65,7 +65,7 @@ pub extern fn main(argc: i32, argv: *const *const u8) -> i32 {
6565
}
6666

6767
#[lang = "eh_personality"] extern fn eh_personality() {}
68-
#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }
68+
#[lang = "panic_fmt"] extern fn panic_fmt() -> ! { loop {} }
6969
# #[lang = "eh_unwind_resume"] extern fn rust_eh_unwind_resume() {}
7070
# #[no_mangle] pub extern fn rust_eh_register_frames () {}
7171
# #[no_mangle] pub extern fn rust_eh_unregister_frames () {}

src/doc/book/vectors.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ You can iterate the vector multiple times by taking a reference to the vector wh
120120
For example, the following code does not compile.
121121

122122
```rust,ignore
123-
let mut v = vec![1, 2, 3, 4, 5];
123+
let v = vec![1, 2, 3, 4, 5];
124124
125125
for i in v {
126126
println!("Take ownership of the vector and its element {}", i);
@@ -134,7 +134,7 @@ for i in v {
134134
Whereas the following works perfectly,
135135

136136
```rust
137-
let mut v = vec![1, 2, 3, 4, 5];
137+
let v = vec![1, 2, 3, 4, 5];
138138

139139
for i in &v {
140140
println!("This is a reference to {}", i);

src/libcollections/binary_heap.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ use vec::{self, Vec};
194194
///
195195
/// // We can iterate over the items in the heap, although they are returned in
196196
/// // a random order.
197-
/// for x in heap.iter() {
197+
/// for x in &heap {
198198
/// println!("{}", x);
199199
/// }
200200
///

src/libcore/convert.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
//!
2020
//! - Impl the `As*` traits for reference-to-reference conversions
2121
//! - Impl the `Into` trait when you want to consume the value in the conversion
22-
//! - The `From` trait is the most flexible, useful for values _and_ references conversions
22+
//! - The `From` trait is the most flexible, useful for value _and_ reference conversions
2323
//!
24-
//! As a library writer, you should prefer implementing `From<T>` rather than
25-
//! `Into<U>`, as `From` provides greater flexibility and offer the equivalent `Into`
24+
//! As a library author, you should prefer implementing `From<T>` rather than
25+
//! `Into<U>`, as `From` provides greater flexibility and offers an equivalent `Into`
2626
//! implementation for free, thanks to a blanket implementation in the standard library.
2727
//!
2828
//! **Note: these traits must not fail**. If the conversion can fail, you must use a dedicated
29-
//! method which return an `Option<T>` or a `Result<T, E>`.
29+
//! method which returns an `Option<T>` or a `Result<T, E>`.
3030
//!
3131
//! # Generic impl
3232
//!
@@ -49,7 +49,7 @@ use marker::Sized;
4949
/// [book]: ../../book/borrow-and-asref.html
5050
///
5151
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
52-
/// return an `Option<T>` or a `Result<T, E>`.
52+
/// returns an `Option<T>` or a `Result<T, E>`.
5353
///
5454
/// # Examples
5555
///
@@ -82,7 +82,7 @@ pub trait AsRef<T: ?Sized> {
8282
/// A cheap, mutable reference-to-mutable reference conversion.
8383
///
8484
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
85-
/// return an `Option<T>` or a `Result<T, E>`.
85+
/// returns an `Option<T>` or a `Result<T, E>`.
8686
///
8787
/// # Generic Impls
8888
///
@@ -99,10 +99,10 @@ pub trait AsMut<T: ?Sized> {
9999
/// A conversion that consumes `self`, which may or may not be expensive.
100100
///
101101
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
102-
/// return an `Option<T>` or a `Result<T, E>`.
102+
/// returns an `Option<T>` or a `Result<T, E>`.
103103
///
104-
/// Library writer should not implement directly this trait, but should prefer the implementation
105-
/// of the `From` trait, which offer greater flexibility and provide the equivalent `Into`
104+
/// Library authors should not directly implement this trait, but should prefer implementing
105+
/// the `From` trait, which offers greater flexibility and provides an equivalent `Into`
106106
/// implementation for free, thanks to a blanket implementation in the standard library.
107107
///
108108
/// # Examples
@@ -134,7 +134,7 @@ pub trait Into<T>: Sized {
134134
/// Construct `Self` via a conversion.
135135
///
136136
/// **Note: this trait must not fail**. If the conversion can fail, use a dedicated method which
137-
/// return an `Option<T>` or a `Result<T, E>`.
137+
/// returns an `Option<T>` or a `Result<T, E>`.
138138
///
139139
/// # Examples
140140
///

src/libstd/env.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ impl Error for JoinPathsError {
416416
fn description(&self) -> &str { self.inner.description() }
417417
}
418418

419-
/// Returns the path to the current user's home directory if known.
419+
/// Returns the path of the current user's home directory if known.
420420
///
421421
/// # Unix
422422
///
@@ -450,7 +450,7 @@ pub fn home_dir() -> Option<PathBuf> {
450450
os_imp::home_dir()
451451
}
452452

453-
/// Returns the path to a temporary directory.
453+
/// Returns the path of a temporary directory.
454454
///
455455
/// On Unix, returns the value of the 'TMPDIR' environment variable if it is
456456
/// set, otherwise for non-Android it returns '/tmp'. If Android, since there
@@ -459,7 +459,7 @@ pub fn home_dir() -> Option<PathBuf> {
459459
///
460460
/// On Windows, returns the value of, in order, the 'TMP', 'TEMP',
461461
/// 'USERPROFILE' environment variable if any are set and not the empty
462-
/// string. Otherwise, tmpdir returns the path to the Windows directory. This
462+
/// string. Otherwise, tmpdir returns the path of the Windows directory. This
463463
/// behavior is identical to that of [GetTempPath][msdn], which this function
464464
/// uses internally.
465465
///
@@ -482,14 +482,14 @@ pub fn temp_dir() -> PathBuf {
482482
os_imp::temp_dir()
483483
}
484484

485-
/// Returns the full filesystem path to the current running executable.
485+
/// Returns the full filesystem path of the current running executable.
486486
///
487-
/// The path returned is not necessarily a "real path" to the executable as
487+
/// The path returned is not necessarily a "real path" of the executable as
488488
/// there may be intermediate symlinks.
489489
///
490490
/// # Errors
491491
///
492-
/// Acquiring the path to the current executable is a platform-specific operation
492+
/// Acquiring the path of the current executable is a platform-specific operation
493493
/// that can fail for a good number of reasons. Some errors can include, but not
494494
/// be limited to, filesystem operations failing or general syscall failures.
495495
///
@@ -526,7 +526,7 @@ pub struct ArgsOs { inner: os_imp::Args }
526526
/// Returns the arguments which this program was started with (normally passed
527527
/// via the command line).
528528
///
529-
/// The first element is traditionally the path to the executable, but it can be
529+
/// The first element is traditionally the path of the executable, but it can be
530530
/// set to arbitrary text, and may not even exist. This means this property should
531531
/// not be relied upon for security purposes.
532532
///
@@ -554,7 +554,7 @@ pub fn args() -> Args {
554554
/// Returns the arguments which this program was started with (normally passed
555555
/// via the command line).
556556
///
557-
/// The first element is traditionally the path to the executable, but it can be
557+
/// The first element is traditionally the path of the executable, but it can be
558558
/// set to arbitrary text, and it may not even exist, so this property should
559559
/// not be relied upon for security purposes.
560560
///

0 commit comments

Comments
 (0)