Skip to content

Commit 43d5219

Browse files
committed
---
yaml --- r: 212336 b: refs/heads/master c: ab86fac h: refs/heads/master v: v3
1 parent 32a8e8e commit 43d5219

Some content is hidden

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

71 files changed

+355
-787
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4a397dd33dad52ca0e66bd5cdfc3b6d049a9ce12
2+
refs/heads/master: ab86face01786a67da3f6d15db0c3295d75dcdd6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/src/doc/trpl/hello-cargo.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ $ mv main.rs src/main.rs
3333
```
3434

3535
Note that since we're creating an executable, we used `main.rs`. If we
36-
want to make a library instead, we should use `lib.rs`. This convention is required
37-
for Cargo to successfully compile our projects, but it can be overridden if we wish.
36+
want to make a library instead, we should use `lib.rs`.
3837
Custom file locations for the entry point can be specified
3938
with a [`[[lib]]` or `[[bin]]`][crates-custom] key in the TOML file described below.
4039

@@ -63,17 +62,18 @@ version = "0.0.1"
6362
authors = [ "Your name <[email protected]>" ]
6463
```
6564

66-
This file is in the [TOML][toml] format. TOML is similar to INI, but has some
67-
extra goodies. According to the TOML docs,
65+
This file is in the [TOML][toml] format. Let’s let it explain itself to you:
6866

6967
> TOML aims to be a minimal configuration file format that's easy to read due
7068
> to obvious semantics. TOML is designed to map unambiguously to a hash table.
7169
> TOML should be easy to parse into data structures in a wide variety of
7270
> languages.
7371
72+
TOML is very similar to INI, but with some extra goodies.
73+
7474
[toml]: https://github.com/toml-lang/toml
7575

76-
Once you have this file in place, we should be ready to build! To do so, run:
76+
Once you have this file in place, we should be ready to build! Try this:
7777

7878
```bash
7979
$ cargo build
@@ -82,7 +82,7 @@ $ ./target/debug/hello_world
8282
Hello, world!
8383
```
8484

85-
Bam! We built our project with `cargo build`, and ran it with
85+
Bam! We build our project with `cargo build`, and run it with
8686
`./target/debug/hello_world`. We can do both in one step with `cargo run`:
8787

8888
```bash
@@ -103,9 +103,9 @@ Hello, world!
103103
```
104104

105105
This hasn’t bought us a whole lot over our simple use of `rustc`, but think
106-
about the future: when our project gets more complex, we need to do more
106+
about the future: when our project gets more complex, we would need to do more
107107
things to get all of the parts to properly compile. With Cargo, as our project
108-
grows, we can just run `cargo build`, and it’ll work the right way.
108+
grows, we can just `cargo build`, and it’ll work the right way.
109109

110110
When your project is finally ready for release, you can use
111111
`cargo build --release` to compile your project with optimizations.
@@ -118,7 +118,7 @@ name = "hello_world"
118118
version = "0.0.1"
119119
```
120120

121-
The `Cargo.lock` file is used by Cargo to keep track of dependencies in your application.
121+
This file is used by Cargo to keep track of dependencies in your application.
122122
Right now, we don’t have any, so it’s a bit sparse. You won't ever need
123123
to touch this file yourself, just let Cargo handle it.
124124

@@ -170,7 +170,7 @@ This is all we need to get started. First, let’s check out `Cargo.toml`:
170170
[package]
171171

172172
name = "hello_world"
173-
version = "0.1.0"
173+
version = "0.0.1"
174174
authors = ["Your Name <[email protected]>"]
175175
```
176176

trunk/src/liballoc/arc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ use heap::deallocate;
9898
/// increase the reference counter.
9999
///
100100
/// ```
101+
/// # #![feature(alloc, core)]
101102
/// use std::sync::Arc;
102103
/// use std::thread;
103104
///
@@ -296,6 +297,7 @@ impl<T: ?Sized> Clone for Arc<T> {
296297
/// # Examples
297298
///
298299
/// ```
300+
/// # #![feature(alloc)]
299301
/// use std::sync::Arc;
300302
///
301303
/// let five = Arc::new(5);
@@ -390,6 +392,7 @@ impl<T: ?Sized> Drop for Arc<T> {
390392
/// # Examples
391393
///
392394
/// ```
395+
/// # #![feature(alloc)]
393396
/// use std::sync::Arc;
394397
///
395398
/// {

trunk/src/liballoc/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ use core::raw::{TraitObject};
8181
#[lang = "exchange_heap"]
8282
#[unstable(feature = "alloc",
8383
reason = "may be renamed; uncertain about custom allocator design")]
84-
pub const HEAP: () = ();
84+
pub static HEAP: () = ();
8585

8686
/// A pointer type for heap allocation.
8787
///

trunk/src/libcollections/binary_heap.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,3 @@ impl<T: Ord> Extend<T> for BinaryHeap<T> {
760760
}
761761
}
762762
}
763-
764-
#[stable(feature = "extend_ref", since = "1.2.0")]
765-
impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BinaryHeap<T> {
766-
fn extend<I: IntoIterator<Item=&'a T>>(&mut self, iter: I) {
767-
self.extend(iter.into_iter().cloned());
768-
}
769-
}

trunk/src/libcollections/bit.rs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ fn match_words <'a,'b>(a: &'a BitVec, b: &'b BitVec) -> (MatchWords<'a>, MatchWo
125125
}
126126
}
127127

128-
const TRUE: &'static bool = &true;
129-
const FALSE: &'static bool = &false;
128+
static TRUE: bool = true;
129+
static FALSE: bool = false;
130130

131131
/// The bitvector type.
132132
///
@@ -172,9 +172,9 @@ impl Index<usize> for BitVec {
172172
#[inline]
173173
fn index(&self, i: usize) -> &bool {
174174
if self.get(i).expect("index out of bounds") {
175-
TRUE
175+
&TRUE
176176
} else {
177-
FALSE
177+
&FALSE
178178
}
179179
}
180180
}
@@ -1070,13 +1070,6 @@ impl Extend<bool> for BitVec {
10701070
}
10711071
}
10721072

1073-
#[stable(feature = "extend_ref", since = "1.2.0")]
1074-
impl<'a> Extend<&'a bool> for BitVec {
1075-
fn extend<I: IntoIterator<Item=&'a bool>>(&mut self, iter: I) {
1076-
self.extend(iter.into_iter().cloned());
1077-
}
1078-
}
1079-
10801073
#[stable(feature = "rust1", since = "1.0.0")]
10811074
impl Clone for BitVec {
10821075
#[inline]
@@ -1285,13 +1278,6 @@ impl Extend<usize> for BitSet {
12851278
}
12861279
}
12871280

1288-
#[stable(feature = "extend_ref", since = "1.2.0")]
1289-
impl<'a> Extend<&'a usize> for BitSet {
1290-
fn extend<I: IntoIterator<Item=&'a usize>>(&mut self, iter: I) {
1291-
self.extend(iter.into_iter().cloned());
1292-
}
1293-
}
1294-
12951281
#[stable(feature = "rust1", since = "1.0.0")]
12961282
impl PartialOrd for BitSet {
12971283
#[inline]

trunk/src/libcollections/btree/map.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,6 @@ impl<K: Ord, V> Extend<(K, V)> for BTreeMap<K, V> {
879879
}
880880
}
881881

882-
#[stable(feature = "extend_ref", since = "1.2.0")]
883-
impl<'a, K: Ord + Copy, V: Copy> Extend<(&'a K, &'a V)> for BTreeMap<K, V> {
884-
fn extend<I: IntoIterator<Item=(&'a K, &'a V)>>(&mut self, iter: I) {
885-
self.extend(iter.into_iter().map(|(&key, &value)| (key, value)));
886-
}
887-
}
888-
889882
#[stable(feature = "rust1", since = "1.0.0")]
890883
impl<K: Hash, V: Hash> Hash for BTreeMap<K, V> {
891884
fn hash<H: Hasher>(&self, state: &mut H) {

trunk/src/libcollections/btree/set.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,13 +509,6 @@ impl<T: Ord> Extend<T> for BTreeSet<T> {
509509
}
510510
}
511511

512-
#[stable(feature = "extend_ref", since = "1.2.0")]
513-
impl<'a, T: 'a + Ord + Copy> Extend<&'a T> for BTreeSet<T> {
514-
fn extend<I: IntoIterator<Item=&'a T>>(&mut self, iter: I) {
515-
self.extend(iter.into_iter().cloned());
516-
}
517-
}
518-
519512
#[stable(feature = "rust1", since = "1.0.0")]
520513
impl<T: Ord> Default for BTreeSet<T> {
521514
#[stable(feature = "rust1", since = "1.0.0")]

trunk/src/libcollections/enum_set.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,3 @@ impl<E:CLike> Extend<E> for EnumSet<E> {
288288
}
289289
}
290290
}
291-
292-
#[stable(feature = "extend_ref", since = "1.2.0")]
293-
impl<'a, E: 'a + CLike + Copy> Extend<&'a E> for EnumSet<E> {
294-
fn extend<I: IntoIterator<Item=&'a E>>(&mut self, iter: I) {
295-
self.extend(iter.into_iter().cloned());
296-
}
297-
}

0 commit comments

Comments
 (0)