Skip to content

Commit b7d0949

Browse files
committed
---
yaml --- r: 210878 b: refs/heads/try c: d332aea h: refs/heads/master v: v3
1 parent 7dd8070 commit b7d0949

File tree

57 files changed

+423
-151
lines changed

Some content is hidden

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

57 files changed

+423
-151
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: eeeb2cc0dffc016582f020c0a9e6d9f9fc751397
5+
refs/heads/try: d332aead906922409e54e6321fbdc774208e692f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# The Rust Programming Language
22

3-
This is a compiler for Rust, including standard libraries, tools and
4-
documentation. Rust is a systems programming language that is fast,
5-
memory safe and multithreaded, but does not employ a garbage collector
6-
or otherwise impose significant runtime overhead.
3+
Rust is a systems programming language that is fast, memory safe and
4+
multithreaded, but does not employ a garbage collector or otherwise
5+
impose significant runtime overhead.
6+
7+
This repo contains the code for `rustc`, the Rust compiler, as well
8+
as standard libraries, tools and documentation for Rust.
79

810
## Quick Start
911

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.1.0
16+
CFG_RELEASE_NUM=1.2.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ feature.
7979
A nice replacement is the [lazy constructor macro][lcm] by [Marvin
8080
Löbel][kim].
8181

82-
[fqa]: https://mail.mozilla.org/pipermail/rust-dev/2013-April/003815.html
82+
[fqa]: http://yosefk.com/c++fqa/ctors.html#fqa-10.12
8383
[elp]: http://ericlippert.com/2013/02/06/static-constructors-part-one/
8484
[lcm]: https://gist.github.com/Kimundi/8782487
8585
[kim]: https://github.com/Kimundi

branches/try/src/doc/trpl/const-and-static.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ static N: i32 = 5;
3131

3232
Unlike [`let`][let] bindings, you must annotate the type of a `static`.
3333

34-
[let]: variable-bindings.html
35-
3634
Statics live for the entire lifetime of a program, and therefore any
37-
reference stored in a constant has a [`static` lifetime][lifetimes]:
35+
reference stored in a constant has a [`'static` lifetime][lifetimes]:
3836

3937
```rust
4038
static NAME: &'static str = "Steve";

branches/try/src/doc/trpl/dining-philosophers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
396396
}).collect();
397397
```
398398

399-
While this is only five lines, they’re a dense four. Let’s break it down.
399+
While this is only five lines, they’re a dense five. Let’s break it down.
400400

401401
```rust,ignore
402402
let handles: Vec<_> =

branches/try/src/doc/trpl/guessing-game.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Check out the generated `Cargo.toml`:
2727
[package]
2828

2929
name = "guessing_game"
30-
version = "0.0.1"
30+
version = "0.1.0"
3131
authors = ["Your Name <[email protected]>"]
3232
```
3333

@@ -46,7 +46,7 @@ Let’s try compiling what Cargo gave us:
4646

4747
```{bash}
4848
$ cargo build
49-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
49+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
5050
```
5151

5252
Excellent! Open up your `src/main.rs` again. We’ll be writing all of
@@ -58,7 +58,7 @@ Try it out:
5858

5959
```bash
6060
$ cargo run
61-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
61+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
6262
Running `target/debug/guessing_game`
6363
Hello, world!
6464
```
@@ -727,7 +727,7 @@ Let’s try our program out!
727727
728728
```bash
729729
$ cargo run
730-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
730+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
731731
Running `target/guessing_game`
732732
Guess the number!
733733
The secret number is: 58
@@ -792,7 +792,7 @@ and quit. Observe:
792792
793793
```bash
794794
$ cargo run
795-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
795+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
796796
Running `target/guessing_game`
797797
Guess the number!
798798
The secret number is: 59
@@ -929,7 +929,7 @@ Now we should be good! Let’s try:
929929
930930
```bash
931931
$ cargo run
932-
Compiling guessing_game v0.0.1 (file:///home/you/projects/guessing_game)
932+
Compiling guessing_game v0.1.0 (file:///home/you/projects/guessing_game)
933933
Running `target/guessing_game`
934934
Guess the number!
935935
The secret number is: 61

branches/try/src/doc/trpl/method-syntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn main() {
156156

157157
This ‘associated function’ builds a new `Circle` for us. Note that associated
158158
functions are called with the `Struct::function()` syntax, rather than the
159-
`ref.method()` syntax. Some other langauges call associated functions ‘static
159+
`ref.method()` syntax. Some other languages call associated functions ‘static
160160
methods’.
161161

162162
# Builder Pattern

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ $ sh rustup.sh --channel=nightly
2626
If you're on Windows, please download either the [32-bit installer][win32] or
2727
the [64-bit installer][win64] and run it.
2828

29-
[win32]: https://static.rust-lang.org/dist/rust-1.0.0-beta-i686-pc-windows-gnu.msi
30-
[win64]: https://static.rust-lang.org/dist/rust-1.0.0-beta-x86_64-pc-windows-gnu.msi
29+
[win32]: https://static.rust-lang.org/dist/rust-nightly-i686-pc-windows-gnu.msi
30+
[win64]: https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi
3131

3232
## Uninstalling
3333

branches/try/src/doc/trpl/traits.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ let result = f.write("whatever".as_bytes());
208208

209209
This will compile without error.
210210

211-
This means that even if someone does something bad like add methods to `int`,
211+
This means that even if someone does something bad like add methods to `i32`,
212212
it won’t affect you, unless you `use` that trait.
213213

214214
There’s one more restriction on implementing traits. Either the trait or the

branches/try/src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#![staged_api]
6565
#![crate_type = "rlib"]
6666
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
67-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
67+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
6868
html_root_url = "http://doc.rust-lang.org/nightly/")]
6969
#![doc(test(no_crate_inject))]
7070

branches/try/src/liballoc/rc.rs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,18 @@ impl<T: Default> Default for Rc<T> {
634634
}
635635

636636
#[stable(feature = "rust1", since = "1.0.0")]
637+
#[cfg(stage0)]
637638
impl<T: PartialEq> PartialEq for Rc<T> {
639+
#[inline(always)]
640+
fn eq(&self, other: &Rc<T>) -> bool { **self == **other }
641+
642+
#[inline(always)]
643+
fn ne(&self, other: &Rc<T>) -> bool { **self != **other }
644+
}
645+
646+
#[stable(feature = "rust1", since = "1.0.0")]
647+
#[cfg(not(stage0))]
648+
impl<T: ?Sized + PartialEq> PartialEq for Rc<T> {
638649
/// Equality for two `Rc<T>`s.
639650
///
640651
/// Two `Rc<T>`s are equal if their inner value are equal.
@@ -669,10 +680,35 @@ impl<T: PartialEq> PartialEq for Rc<T> {
669680
}
670681

671682
#[stable(feature = "rust1", since = "1.0.0")]
683+
#[cfg(stage0)]
672684
impl<T: Eq> Eq for Rc<T> {}
685+
#[stable(feature = "rust1", since = "1.0.0")]
686+
#[cfg(not(stage0))]
687+
impl<T: ?Sized + Eq> Eq for Rc<T> {}
673688

674689
#[stable(feature = "rust1", since = "1.0.0")]
690+
#[cfg(stage0)]
675691
impl<T: PartialOrd> PartialOrd for Rc<T> {
692+
#[inline(always)]
693+
fn partial_cmp(&self, other: &Rc<T>) -> Option<Ordering> {
694+
(**self).partial_cmp(&**other)
695+
}
696+
697+
#[inline(always)]
698+
fn lt(&self, other: &Rc<T>) -> bool { **self < **other }
699+
700+
#[inline(always)]
701+
fn le(&self, other: &Rc<T>) -> bool { **self <= **other }
702+
703+
#[inline(always)]
704+
fn gt(&self, other: &Rc<T>) -> bool { **self > **other }
705+
706+
#[inline(always)]
707+
fn ge(&self, other: &Rc<T>) -> bool { **self >= **other }
708+
}
709+
#[stable(feature = "rust1", since = "1.0.0")]
710+
#[cfg(not(stage0))]
711+
impl<T: ?Sized + PartialOrd> PartialOrd for Rc<T> {
676712
/// Partial comparison for two `Rc<T>`s.
677713
///
678714
/// The two are compared by calling `partial_cmp()` on their inner values.
@@ -757,7 +793,14 @@ impl<T: PartialOrd> PartialOrd for Rc<T> {
757793
}
758794

759795
#[stable(feature = "rust1", since = "1.0.0")]
796+
#[cfg(stage0)]
760797
impl<T: Ord> Ord for Rc<T> {
798+
#[inline]
799+
fn cmp(&self, other: &Rc<T>) -> Ordering { (**self).cmp(&**other) }
800+
}
801+
#[stable(feature = "rust1", since = "1.0.0")]
802+
#[cfg(not(stage0))]
803+
impl<T: ?Sized + Ord> Ord for Rc<T> {
761804
/// Comparison for two `Rc<T>`s.
762805
///
763806
/// The two are compared by calling `cmp()` on their inner values.
@@ -1399,4 +1442,9 @@ mod tests {
13991442
assert_eq!(format!("{:?}", foo), "75");
14001443
}
14011444

1445+
#[test]
1446+
fn test_unsized() {
1447+
let foo: Rc<[i32]> = Rc::new([1, 2, 3]);
1448+
assert_eq!(foo, foo.clone());
1449+
}
14021450
}

branches/try/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#![crate_type = "rlib"]
2828
#![crate_type = "dylib"]
2929
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
30-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
30+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
3131
html_root_url = "http://doc.rust-lang.org/nightly/")]
3232

3333
#![feature(alloc)]

branches/try/src/libcollections/borrow.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,16 @@ impl<'a, T: ?Sized> BorrowMut<T> for &'a mut T {
116116
fn borrow_mut(&mut self) -> &mut T { &mut **self }
117117
}
118118

119+
#[cfg(stage0)]
119120
impl<T> Borrow<T> for rc::Rc<T> {
120121
fn borrow(&self) -> &T { &**self }
121122
}
122123

124+
#[cfg(not(stage0))]
125+
impl<T: ?Sized> Borrow<T> for rc::Rc<T> {
126+
fn borrow(&self) -> &T { &**self }
127+
}
128+
123129
impl<T> Borrow<T> for arc::Arc<T> {
124130
fn borrow(&self) -> &T { &**self }
125131
}

branches/try/src/libcollections/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#![staged_api]
2020
#![crate_type = "rlib"]
2121
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
22+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2323
html_root_url = "http://doc.rust-lang.org/nightly/",
2424
html_playground_url = "http://play.rust-lang.org/")]
2525
#![doc(test(no_crate_inject))]

branches/try/src/libcore/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
#![staged_api]
5454
#![crate_type = "rlib"]
5555
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
56-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
56+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
5757
html_root_url = "http://doc.rust-lang.org/nightly/",
5858
html_playground_url = "http://play.rust-lang.org/")]
5959
#![doc(test(no_crate_inject))]

branches/try/src/libcore/slice.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -681,14 +681,14 @@ macro_rules! iterator {
681681
#[inline]
682682
fn next(&mut self) -> Option<$elem> {
683683
// could be implemented with slices, but this avoids bounds checks
684-
if self.ptr == self.end {
685-
None
686-
} else {
687-
unsafe {
688-
if mem::size_of::<T>() != 0 {
689-
::intrinsics::assume(!self.ptr.is_null());
690-
::intrinsics::assume(!self.end.is_null());
691-
}
684+
unsafe {
685+
if mem::size_of::<T>() != 0 {
686+
assume(!self.ptr.is_null());
687+
assume(!self.end.is_null());
688+
}
689+
if self.ptr == self.end {
690+
None
691+
} else {
692692
let old = self.ptr;
693693
self.ptr = slice_offset!(self.ptr, 1);
694694
Some(slice_ref!(old))
@@ -726,15 +726,15 @@ macro_rules! iterator {
726726
#[inline]
727727
fn next_back(&mut self) -> Option<$elem> {
728728
// could be implemented with slices, but this avoids bounds checks
729-
if self.end == self.ptr {
730-
None
731-
} else {
732-
unsafe {
729+
unsafe {
730+
if mem::size_of::<T>() != 0 {
731+
assume(!self.ptr.is_null());
732+
assume(!self.end.is_null());
733+
}
734+
if self.end == self.ptr {
735+
None
736+
} else {
733737
self.end = slice_offset!(self.end, -1);
734-
if mem::size_of::<T>() != 0 {
735-
::intrinsics::assume(!self.ptr.is_null());
736-
::intrinsics::assume(!self.end.is_null());
737-
}
738738
Some(slice_ref!(self.end))
739739
}
740740
}

branches/try/src/libflate/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![crate_type = "rlib"]
2323
#![crate_type = "dylib"]
2424
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
25-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
25+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2626
html_root_url = "http://doc.rust-lang.org/nightly/")]
2727

2828
#![feature(libc)]

branches/try/src/libfmt_macros/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#![crate_type = "rlib"]
2323
#![crate_type = "dylib"]
2424
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
25-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
25+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2626
html_root_url = "http://doc.rust-lang.org/nightly/",
2727
html_playground_url = "http://play.rust-lang.org/")]
2828

branches/try/src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
#![crate_type = "rlib"]
8686
#![crate_type = "dylib"]
8787
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
88-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
88+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
8989
html_root_url = "http://doc.rust-lang.org/nightly/",
9090
html_playground_url = "http://play.rust-lang.org/")]
9191

branches/try/src/libgraphviz/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
#![crate_type = "rlib"]
280280
#![crate_type = "dylib"]
281281
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
282-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
282+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
283283
html_root_url = "http://doc.rust-lang.org/nightly/")]
284284
#![feature(collections)]
285285
#![feature(into_cow)]

branches/try/src/liblibc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#![cfg_attr(not(feature = "cargo-build"), staged_api)]
1919
#![cfg_attr(not(feature = "cargo-build"), no_std)]
2020
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
21-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
21+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2222
html_root_url = "http://doc.rust-lang.org/nightly/",
2323
html_playground_url = "http://play.rust-lang.org/")]
2424
#![cfg_attr(test, feature(test))]

branches/try/src/liblog/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
#![crate_type = "rlib"]
165165
#![crate_type = "dylib"]
166166
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
167-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
167+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
168168
html_root_url = "http://doc.rust-lang.org/nightly/",
169169
html_playground_url = "http://play.rust-lang.org/")]
170170
#![deny(missing_docs)]

branches/try/src/librand/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#![crate_name = "rand"]
2222
#![crate_type = "rlib"]
2323
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
24-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
24+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2525
html_root_url = "http://doc.rust-lang.org/nightly/",
2626
html_playground_url = "http://play.rust-lang.org/")]
2727
#![no_std]

branches/try/src/librbml/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
#![crate_type = "rlib"]
120120
#![crate_type = "dylib"]
121121
#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
122-
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
122+
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
123123
html_root_url = "http://doc.rust-lang.org/nightly/",
124124
html_playground_url = "http://play.rust-lang.org/")]
125125

0 commit comments

Comments
 (0)