Skip to content

Commit a89d907

Browse files
committed
---
yaml --- r: 210297 b: refs/heads/try c: 135502e h: refs/heads/master i: 210295: 5d24554 v: v3
1 parent 141feaf commit a89d907

Some content is hidden

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

46 files changed

+320
-255
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 2c04696978e5db737c1b491b171fbcfa2ac921c6
5+
refs/heads/try: 135502ef0016fd6b17324cc1ed4e088863a97176
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/complement-lang-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ This does mean that indexed access to a Unicode codepoint inside a `str` value i
109109
* 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.
110110
* 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.
111111

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

114114
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.
115115

branches/try/src/doc/trpl/error-handling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ struct Info {
252252
}
253253

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

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

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

287287
try!(writeln!(&mut file, "name: {}", info.name));
288288
try!(writeln!(&mut file, "age: {}", info.age));

branches/try/src/doc/trpl/installing-rust.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ or a Mac, all you need to do is this (note that you don't need to type in the
66
`$`s, they just indicate the start of each command):
77

88
```bash
9-
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sudo sh
9+
$ curl -sf -L https://static.rust-lang.org/rustup.sh | sh
1010
```
1111

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

1616
```bash
1717
$ curl -f -L https://static.rust-lang.org/rustup.sh -O
18-
$ sudo sh rustup.sh
18+
$ sh rustup.sh
1919
```
2020

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

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

5149
[from source]: https://github.com/rust-lang/rust#building-from-source
5250
[install page]: http://www.rust-lang.org/install.html

branches/try/src/doc/trpl/nightly-rust.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ process, see ‘[Stability as a deliverable][stability]’.
99
To install nightly Rust, you can use `rustup.sh`:
1010

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

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

1919
```bash
2020
$ curl -f -L https://static.rust-lang.org/rustup.sh -O
21-
$ sudo sh rustup.sh --channel=nightly
21+
$ sh rustup.sh --channel=nightly
2222
```
2323

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

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

5452
[from source]: https://github.com/rust-lang/rust#building-from-source
5553
[install page]: http://www.rust-lang.org/install.html

branches/try/src/etc/extract_grammar.py

Lines changed: 0 additions & 156 deletions
This file was deleted.

branches/try/src/libcollections/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ impl str {
713713
/// is skipped if empty.
714714
///
715715
/// This method can be used for string data that is _terminated_,
716-
/// rather than _seperated_ by a pattern.
716+
/// rather than _separated_ by a pattern.
717717
///
718718
/// # Iterator behavior
719719
///
@@ -760,7 +760,7 @@ impl str {
760760
/// skipped if empty.
761761
///
762762
/// This method can be used for string data that is _terminated_,
763-
/// rather than _seperated_ by a pattern.
763+
/// rather than _separated_ by a pattern.
764764
///
765765
/// # Iterator behavior
766766
///

branches/try/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ impl FromUtf8Error {
757757
#[stable(feature = "rust1", since = "1.0.0")]
758758
pub fn into_bytes(self) -> Vec<u8> { self.bytes }
759759

760-
/// Accesss the underlying UTF8-error that was the cause of this error.
760+
/// Access the underlying UTF8-error that was the cause of this error.
761761
#[stable(feature = "rust1", since = "1.0.0")]
762762
pub fn utf8_error(&self) -> Utf8Error { self.error }
763763
}

branches/try/src/libcollections/vec.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,43 @@
1515
//!
1616
//! # Examples
1717
//!
18-
//! Explicitly creating a `Vec<T>` with `new()`:
18+
//! You can explicitly create a `Vec<T>` with `new()`:
1919
//!
2020
//! ```
2121
//! let xs: Vec<i32> = Vec::new();
2222
//! ```
2323
//!
24-
//! Using the `vec!` macro:
24+
//! ...or by using the `vec!` macro:
2525
//!
2626
//! ```
2727
//! let ys: Vec<i32> = vec![];
2828
//!
2929
//! let zs = vec![1i32, 2, 3, 4, 5];
3030
//! ```
3131
//!
32-
//! Push:
32+
//! You can `push` values onto the end of a vector (which will grow the vector as needed):
3333
//!
3434
//! ```
3535
//! let mut xs = vec![1i32, 2];
3636
//!
3737
//! xs.push(3);
3838
//! ```
3939
//!
40-
//! And pop:
40+
//! Popping values works in much the same way:
4141
//!
4242
//! ```
4343
//! let mut xs = vec![1i32, 2];
4444
//!
4545
//! let two = xs.pop();
4646
//! ```
47+
//!
48+
//! Vectors also support indexing (through the `Index` and `IndexMut` traits):
49+
//!
50+
//! ```
51+
//! let mut xs = vec![1i32, 2, 3];
52+
//! let three = xs[2];
53+
//! xs[1] = xs[1] + 5;
54+
//! ```
4755
4856
#![stable(feature = "rust1", since = "1.0.0")]
4957

branches/try/src/libcore/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ use slice;
161161
// `Iterator` is an enumeration with one type parameter and two variants,
162162
// which basically means it must be `Option`.
163163

164-
/// The `Option` type. See [the module level documentation](../index.html) for more.
164+
/// The `Option` type. See [the module level documentation](index.html) for more.
165165
#[derive(Clone, Copy, PartialEq, PartialOrd, Eq, Ord, Debug, Hash)]
166166
#[stable(feature = "rust1", since = "1.0.0")]
167167
pub enum Option<T> {

branches/try/src/libcore/str/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ macro_rules! derive_pattern_clone {
421421
/// wrapping an private internal one that makes use of the `Pattern` API.
422422
///
423423
/// For all patterns `P: Pattern<'a>` the following items will be
424-
/// generated (generics ommitted):
424+
/// generated (generics omitted):
425425
///
426426
/// struct $forward_iterator($internal_iterator);
427427
/// struct $reverse_iterator($internal_iterator);

branches/try/src/librustc/middle/infer/higher_ranked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<'a,'tcx> InferCtxtExt for InferCtxt<'a,'tcx> {
461461

462462
/// Constructs and returns a substitution that, for a given type
463463
/// scheme parameterized by `generics`, will replace every generic
464-
/// parmeter in the type with a skolemized type/region (which one can
464+
/// parameter in the type with a skolemized type/region (which one can
465465
/// think of as a "fresh constant", except at the type/region level of
466466
/// reasoning).
467467
///

branches/try/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ pub enum Predicate<'tcx> {
19081908
}
19091909

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

branches/try/src/librustc_trans/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ fn add_local_native_libraries(cmd: &mut Command, sess: &Session) {
10781078
sess.target_filesearch(PathKind::All).for_each_lib_search_path(|path, k| {
10791079
match k {
10801080
PathKind::Framework => { cmd.arg("-F").arg(path); }
1081-
_ => { cmd.arg("-L").arg(path); }
1081+
_ => { cmd.arg("-L").arg(&fix_windows_verbatim_for_gcc(path)); }
10821082
}
10831083
FileDoesntMatch
10841084
});

0 commit comments

Comments
 (0)