Skip to content

Commit d3e7922

Browse files
committed
auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, r=alexcrichton
I corrected spelling and capitalization errors in comments and strings.
2 parents bef51ba + b7bfe04 commit d3e7922

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+64
-64
lines changed

src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub trait Set<T>: Collection {
289289
}
290290

291291
/// A mutable collection of values which are distinct from one another that
292-
/// can be mutaed.
292+
/// can be mutated.
293293
pub trait MutableSet<T>: Set<T> + Mutable {
294294
/// Adds a value to the set. Returns `true` if the value was not already
295295
/// present in the set.

src/libcollections/ringbuf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ impl<T> RingBuf<T> {
132132
elts: Vec::from_fn(cmp::max(MINIMUM_CAPACITY, n), |_| None)}
133133
}
134134

135-
/// Retrieva an element in the `RingBuf` by index.
135+
/// Retrieve an element in the `RingBuf` by index.
136136
///
137137
/// Fails if there is no element with the given index.
138138
///

src/libcollections/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ impl<V:Clone> SmallIntMap<V> {
324324
/// Updates a value in the map. If the key already exists in the map,
325325
/// modifies the value with `ff` taking `oldval, newval`.
326326
/// Otherwise, sets the value to `newval`.
327-
/// Returasn `true` if the key did not already exist in the map.
327+
/// Returns `true` if the key did not already exist in the map.
328328
///
329329
/// # Example
330330
///

src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
//!
4545
//! # Representation
4646
//!
47-
//! Rust's string type, `str`, is a sequence of unicode scalar values encoded as a
47+
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as a
4848
//! stream of UTF-8 bytes. All strings are guaranteed to be validly encoded UTF-8
4949
//! sequences. Additionally, strings are not null-terminated and can contain null
5050
//! bytes.

src/libcore/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub fn escape_unicode(c: char, f: |char|) {
201201
/// - Tab, CR and LF are escaped as '\t', '\r' and '\n' respectively.
202202
/// - Single-quote, double-quote and backslash chars are backslash-escaped.
203203
/// - Any other chars in the range [0x20,0x7e] are not escaped.
204-
/// - Any other chars are given hex unicode escapes; see `escape_unicode`.
204+
/// - Any other chars are given hex Unicode escapes; see `escape_unicode`.
205205
///
206206
pub fn escape_default(c: char, f: |char|) {
207207
match c {
@@ -290,7 +290,7 @@ pub trait Char {
290290
/// * Single-quote, double-quote and backslash chars are backslash-
291291
/// escaped.
292292
/// * Any other chars in the range [0x20,0x7e] are not escaped.
293-
/// * Any other chars are given hex unicode escapes; see `escape_unicode`.
293+
/// * Any other chars are given hex Unicode escapes; see `escape_unicode`.
294294
fn escape_default(&self, f: |char|);
295295

296296
/// Returns the amount of bytes this character would need if encoded in

src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ extern "rust-intrinsic" {
311311

312312
/// Gives the address for the return value of the enclosing function.
313313
///
314-
/// Using this instrinsic in a function that does not use an out pointer
314+
/// Using this intrinsic in a function that does not use an out pointer
315315
/// will trigger a compiler error.
316316
pub fn return_address() -> *const u8;
317317

src/libcore/str.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ pub trait StrSlice<'a> {
11281128
fn contains_char(&self, needle: char) -> bool;
11291129

11301130
/// An iterator over the characters of `self`. Note, this iterates
1131-
/// over unicode code-points, not unicode graphemes.
1131+
/// over Unicode code-points, not Unicode graphemes.
11321132
///
11331133
/// # Example
11341134
///
@@ -1505,7 +1505,7 @@ pub trait StrSlice<'a> {
15051505
/// Pluck a character out of a string and return the index of the next
15061506
/// character.
15071507
///
1508-
/// This function can be used to iterate over the unicode characters of a
1508+
/// This function can be used to iterate over the Unicode characters of a
15091509
/// string.
15101510
///
15111511
/// # Example
@@ -1549,7 +1549,7 @@ pub trait StrSlice<'a> {
15491549
/// # Return value
15501550
///
15511551
/// A record {ch: char, next: uint} containing the char value and the byte
1552-
/// index of the next unicode character.
1552+
/// index of the next Unicode character.
15531553
///
15541554
/// # Failure
15551555
///
@@ -1559,7 +1559,7 @@ pub trait StrSlice<'a> {
15591559

15601560
/// Given a byte position and a str, return the previous char and its position.
15611561
///
1562-
/// This function can be used to iterate over a unicode string in reverse.
1562+
/// This function can be used to iterate over a Unicode string in reverse.
15631563
///
15641564
/// Returns 0 for next index if called on start index 0.
15651565
///

src/liblibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* definitions common-to-all (held in modules named c95, c99, posix88, posix01
6666
* and posix08) and definitions that appear only on *some* platforms (named
6767
* 'extra'). This would be things like significant OSX foundation kit, or Windows
68-
* library kernel32.dll, or various fancy glibc, linux or BSD extensions.
68+
* library kernel32.dll, or various fancy glibc, Linux or BSD extensions.
6969
*
7070
* In addition to the per-platform 'extra' modules, we define a module of
7171
* 'common BSD' libc routines that never quite made it into POSIX but show up

src/libnative/io/net.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,8 @@ impl rtio::RtioUdpSocket for UdpSocket {
901901
//
902902
// It turns out that there's this nifty MSG_DONTWAIT flag which can be passed to
903903
// send/recv, but the niftiness wears off once you realize it only works well on
904-
// linux [1] [2]. This means that it's pretty easy to get a nonblocking
905-
// operation on linux (no flag fiddling, no affecting other objects), but not on
904+
// Linux [1] [2]. This means that it's pretty easy to get a nonblocking
905+
// operation on Linux (no flag fiddling, no affecting other objects), but not on
906906
// other platforms.
907907
//
908908
// To work around this constraint on other platforms, we end up using the
@@ -922,7 +922,7 @@ impl rtio::RtioUdpSocket for UdpSocket {
922922
// operations performed in the lock are *nonblocking* to avoid holding the mutex
923923
// forever.
924924
//
925-
// So, in summary, linux uses MSG_DONTWAIT and doesn't need mutexes, everyone
925+
// So, in summary, Linux uses MSG_DONTWAIT and doesn't need mutexes, everyone
926926
// else uses O_NONBLOCK and mutexes with some trickery to make sure blocking
927927
// reads/writes are still blocking.
928928
//

src/libnative/io/pipe_windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ impl UnixAcceptor {
655655
// using the original server pipe.
656656
let handle = self.listener.handle;
657657

658-
// If we've had an artifical call to close_accept, be sure to never
658+
// If we've had an artificial call to close_accept, be sure to never
659659
// proceed in accepting new clients in the future
660660
if self.inner.closed.load(atomic::SeqCst) { return Err(util::eof()) }
661661

0 commit comments

Comments
 (0)