Skip to content

Rollup of PRs in the queue; Tuesday #25111

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 28 commits into from
May 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
75a3e29
=BG= minor: File::open --> File::create in rust book
bguiz May 3, 2015
35149bf
Clean up HashMap examples
killercup May 3, 2015
6814c2f
HashSet Docs: Split First Paragraph
killercup May 3, 2015
1283044
Clean up HashSet Examples
killercup May 3, 2015
5ad6edb
Fix Derive Notice for HashMap
killercup May 3, 2015
2ac380a
Fix Derive Notice for HashSet
killercup May 3, 2015
92d49cf
Remove unused extract_grammar.py
carols10cents May 3, 2015
51463c3
Improve std::vec module documentation.
May 4, 2015
c62c908
Correct pretty-printing of `type Foo<T> where T: Bound = ...;`
pnkfelix May 4, 2015
86de427
Fix incorrect link in Option documentation.
WI-Lee May 4, 2015
464069a
Fix spelling errors in documentation.
jbcrail May 4, 2015
9b1dd4b
std: Fix {atime,mtime,ctime}_nsec accessors
alexcrichton May 3, 2015
2de6515
doc: rustup.sh doesn't require sudo
brson Apr 30, 2015
9305558
doc: fix markup
tshepang May 4, 2015
b630cd7
Strings and vectors are not built-in types.
Stebalien May 4, 2015
2c04696
doc: Cargo documentation doesn't have https
alexcrichton May 4, 2015
b8fedad
Rollup merge of #25068 - bguiz:patch-3, r=steveklabnik
Manishearth May 5, 2015
a374b90
Rollup merge of #25074 - killercup:patch-10, r=alexcrichton
Manishearth May 5, 2015
6bb4998
Rollup merge of #25079 - alexcrichton:fix-nsec, r=aturon
Manishearth May 5, 2015
7413052
Rollup merge of #25081 - carols10cents:remove-extract-grammar, r=stev…
Manishearth May 5, 2015
86a858a
Rollup merge of #25087 - nham:improve_vec_docs, r=Gankro
Manishearth May 5, 2015
9f50d62
Rollup merge of #25092 - pnkfelix:fix-pprint-of-type-items-with-where…
Manishearth May 5, 2015
4fb2216
Rollup merge of #25099 - Eljay:master, r=steveklabnik
Manishearth May 5, 2015
266d482
Rollup merge of #25100 - jbcrail:fix-spelling-errors, r=steveklabnik
Manishearth May 5, 2015
aff0782
Rollup merge of #25104 - brson:rustup, r=alexcrichton
Manishearth May 5, 2015
60f01b4
Rollup merge of #25105 - tshepang:doc-addr, r=steveklabnik
Manishearth May 5, 2015
dc15a15
Rollup merge of #25107 - Stebalien:fix-faq, r=steveklabnik
Manishearth May 5, 2015
135502e
Rollup merge of #25109 - alexcrichton:fix-doc-crates-io-link, r=steve…
Manishearth May 5, 2015
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/complement-lang-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ This does mean that indexed access to a Unicode codepoint inside a `str` value i
* Most "character oriented" operations on text only work under very restricted language assumptions sets such as "ASCII-range codepoints only". Outside ASCII-range, you tend to have to use a complex (non-constant-time) algorithm for determining linguistic-unit (glyph, word, paragraph) boundaries anyways. We recommend using an "honest" linguistically-aware, Unicode-approved algorithm.
* The `char` type is UCS4. If you honestly need to do a codepoint-at-a-time algorithm, it's trivial to write a `type wstr = [char]`, and unpack a `str` into it in a single pass, then work with the `wstr`. In other words: the fact that the language is not "decoding to UCS4 by default" shouldn't stop you from decoding (or re-encoding any other way) if you need to work with that encoding.

## Why are strings, vectors etc. built-in types rather than (say) special kinds of trait/impl?
## Why are `str`s, slices, arrays etc. built-in types rather than (say) special kinds of trait/impl?

In each case there is one or more operator, literal constructor, overloaded use or integration with a built-in control structure that makes us think it would be awkward to phrase the type in terms of more-general type constructors. Same as, say, with numbers! But this is partly an aesthetic call, and we'd be willing to look at a worked-out proposal for eliminating or rephrasing these special cases.

Expand Down
4 changes: 2 additions & 2 deletions src/doc/trpl/error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct Info {
}

fn write_info(info: &Info) -> io::Result<()> {
let mut file = File::open("my_best_friends.txt").unwrap();
let mut file = File::create("my_best_friends.txt").unwrap();

if let Err(e) = writeln!(&mut file, "name: {}", info.name) {
return Err(e)
Expand Down Expand Up @@ -282,7 +282,7 @@ struct Info {
}

fn write_info(info: &Info) -> io::Result<()> {
let mut file = try!(File::open("my_best_friends.txt"));
let mut file = try!(File::create("my_best_friends.txt"));

try!(writeln!(&mut file, "name: {}", info.name));
try!(writeln!(&mut file, "age: {}", info.age));
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/hello-cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ projects. Cargo is currently in a pre-1.0 state, and so it is still a work in
progress. However, it is already good enough to use for many Rust projects, and
so it is assumed that Rust projects will use Cargo from the beginning.

[cratesio]: https://doc.crates.io
[cratesio]: http://doc.crates.io

Cargo manages three things: building your code, downloading the dependencies
your code needs, and building those dependencies. At first, your
Expand Down
12 changes: 5 additions & 7 deletions src/doc/trpl/installing-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ or a Mac, all you need to do is this (note that you don't need to type in the
`$`s, they just indicate the start of each command):

```bash
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sudo sh
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sh
```

If you're concerned about the [potential insecurity][insecurity] of using `curl
| sudo sh`, please keep reading and see our disclaimer below. And feel free to
| sh`, please keep reading and see our disclaimer below. And feel free to
use a two-step version of the installation and examine our installation script:

```bash
$ curl -f -L https://static.rust-lang.org/rustup.sh -O
$ sudo sh rustup.sh
$ sh rustup.sh
```

[insecurity]: http://curlpipesh.tumblr.com
Expand All @@ -40,13 +40,11 @@ If you used the Windows installer, just re-run the `.msi` and it will give you
an uninstall option.

Some people, and somewhat rightfully so, get very upset when we tell you to
`curl | sudo sh`. Basically, when you do this, you are trusting that the good
`curl | sh`. Basically, when you do this, you are trusting that the good
people who maintain Rust aren't going to hack your computer and do bad things.
That's a good instinct! If you're one of those people, please check out the
documentation on [building Rust from Source][from source], or [the official
binary downloads][install page]. And we promise that this method will not be
the way to install Rust forever: it's just the easiest way to keep people
updated while Rust is in its alpha state.
binary downloads][install page].

[from source]: https://github.com/rust-lang/rust#building-from-source
[install page]: http://www.rust-lang.org/install.html
Expand Down
12 changes: 5 additions & 7 deletions src/doc/trpl/nightly-rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ process, see ‘[Stability as a deliverable][stability]’.
To install nightly Rust, you can use `rustup.sh`:

```bash
$ curl -s https://static.rust-lang.org/rustup.sh | sudo sh -s -- --channel=nightly
$ curl -s https://static.rust-lang.org/rustup.sh | sh -s -- --channel=nightly
```

If you're concerned about the [potential insecurity][insecurity] of using `curl
| sudo sh`, please keep reading and see our disclaimer below. And feel free to
| sh`, please keep reading and see our disclaimer below. And feel free to
use a two-step version of the installation and examine our installation script:

```bash
$ curl -f -L https://static.rust-lang.org/rustup.sh -O
$ sudo sh rustup.sh --channel=nightly
$ sh rustup.sh --channel=nightly
```

[insecurity]: http://curlpipesh.tumblr.com
Expand All @@ -43,13 +43,11 @@ If you used the Windows installer, just re-run the `.msi` and it will give you
an uninstall option.

Some people, and somewhat rightfully so, get very upset when we tell you to
`curl | sudo sh`. Basically, when you do this, you are trusting that the good
`curl | sh`. Basically, when you do this, you are trusting that the good
people who maintain Rust aren't going to hack your computer and do bad things.
That's a good instinct! If you're one of those people, please check out the
documentation on [building Rust from Source][from source], or [the official
binary downloads][install page]. And we promise that this method will not be
the way to install Rust forever: it's just the easiest way to keep people
updated while Rust is in its alpha state.
binary downloads][install page].

[from source]: https://github.com/rust-lang/rust#building-from-source
[install page]: http://www.rust-lang.org/install.html
Expand Down
156 changes: 0 additions & 156 deletions src/etc/extract_grammar.py

This file was deleted.

4 changes: 2 additions & 2 deletions src/libcollections/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ impl str {
/// is skipped if empty.
///
/// This method can be used for string data that is _terminated_,
/// rather than _seperated_ by a pattern.
/// rather than _separated_ by a pattern.
///
/// # Iterator behavior
///
Expand Down Expand Up @@ -760,7 +760,7 @@ impl str {
/// skipped if empty.
///
/// This method can be used for string data that is _terminated_,
/// rather than _seperated_ by a pattern.
/// rather than _separated_ by a pattern.
///
/// # Iterator behavior
///
Expand Down
2 changes: 1 addition & 1 deletion src/libcollections/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ impl FromUtf8Error {
#[stable(feature = "rust1", since = "1.0.0")]
pub fn into_bytes(self) -> Vec<u8> { self.bytes }

/// Accesss the underlying UTF8-error that was the cause of this error.
/// Access the underlying UTF8-error that was the cause of this error.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn utf8_error(&self) -> Utf8Error { self.error }
}
Expand Down
16 changes: 12 additions & 4 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,43 @@
//!
//! # Examples
//!
//! Explicitly creating a `Vec<T>` with `new()`:
//! You can explicitly create a `Vec<T>` with `new()`:
//!
//! ```
//! let xs: Vec<i32> = Vec::new();
//! ```
//!
//! Using the `vec!` macro:
//! ...or by using the `vec!` macro:
//!
//! ```
//! let ys: Vec<i32> = vec![];
//!
//! let zs = vec![1i32, 2, 3, 4, 5];
//! ```
//!
//! Push:
//! You can `push` values onto the end of a vector (which will grow the vector as needed):
//!
//! ```
//! let mut xs = vec![1i32, 2];
//!
//! xs.push(3);
//! ```
//!
//! And pop:
//! Popping values works in much the same way:
//!
//! ```
//! let mut xs = vec![1i32, 2];
//!
//! let two = xs.pop();
//! ```
//!
//! Vectors also support indexing (through the `Index` and `IndexMut` traits):
//!
//! ```
//! let mut xs = vec![1i32, 2, 3];
//! let three = xs[2];
//! xs[1] = xs[1] + 5;
//! ```

#![stable(feature = "rust1", since = "1.0.0")]

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ use slice;
// `Iterator` is an enumeration with one type parameter and two variants,
// which basically means it must be `Option`.

/// The `Option` type. See [the module level documentation](../index.html) for more.
/// The `Option` type. See [the module level documentation](index.html) for more.
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
#[stable(feature = "rust1", since = "1.0.0")]
pub enum Option<T> {
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ macro_rules! derive_pattern_clone {
/// wrapping an private internal one that makes use of the `Pattern` API.
///
/// For all patterns `P: Pattern<'a>` the following items will be
/// generated (generics ommitted):
/// generated (generics omitted):
///
/// struct $forward_iterator($internal_iterator);
/// struct $reverse_iterator($internal_iterator);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/infer/higher_ranked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ impl<'a,'tcx> InferCtxtExt for InferCtxt<'a,'tcx> {

/// Constructs and returns a substitution that, for a given type
/// scheme parameterized by `generics`, will replace every generic
/// parmeter in the type with a skolemized type/region (which one can
/// parameter in the type with a skolemized type/region (which one can
/// think of as a "fresh constant", except at the type/region level of
/// reasoning).
///
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ pub enum Predicate<'tcx> {
}

impl<'tcx> Predicate<'tcx> {
/// Performs a substituion suitable for going from a
/// Performs a substitution suitable for going from a
/// poly-trait-ref to supertraits that must hold if that
/// poly-trait-ref holds. This is slightly different from a normal
/// substitution in terms of what happens with bound regions. See
Expand Down
Loading