Skip to content

Commit 5226ca1

Browse files
committed
---
yaml --- r: 125677 b: refs/heads/try c: c8b8444 h: refs/heads/master i: 125675: 8daaa00 v: v3
1 parent 7e07594 commit 5226ca1

File tree

188 files changed

+1503
-4059
lines changed

Some content is hidden

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

188 files changed

+1503
-4059
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: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: 8672a235dd5b4677a6ff0ede1e3ce39b076b5414
5+
refs/heads/try: c8b8444ce131798b94e759138bb307144ed0994f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
6868
formatted flowgraph for node)
6969
.TP
7070
\fB\-\-dep-info\fR [FILENAME]
71-
Output dependency info to <filename> after compiling, in a format suitable
71+
Output dependency info to <filename> after compiling, in o format suitable
7272
for use by Makefiles.
7373
.TP
7474
\fB\-\-sysroot\fR PATH

branches/try/mk/docs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
3030
guide-tasks guide-container guide-pointers guide-testing \
3131
guide-runtime complement-bugreport \
3232
complement-lang-faq complement-design-faq complement-project-faq rust \
33-
rustdoc guide-unsafe guide-strings
33+
rustdoc guide-unsafe
3434

3535
PDF_DOCS := tutorial rust
3636

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ define SREQ_CMDS
377377
ifeq ($$(OSTYPE_$(3)),apple-darwin)
378378
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := DYLD_LIBRARY_PATH
379379
else
380-
ifeq ($$(CFG_WINDOWSY_$(3)),1)
380+
ifeq ($$(CFG_WINDOWSY_$(2)),1)
381381
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := PATH
382382
else
383383
LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3) := LD_LIBRARY_PATH

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You may also be interested in browsing [GitHub's Rust][github-rust] page.
3131

3232
## Does it run on Windows?
3333

34-
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depend on libgcc DLL at runtime][libgcc].
34+
Yes. All development happens in lock-step on all 3 target platforms. Using MinGW, not Cygwin. Note that the windows implementation currently has some limitations: in particular 64-bit build is [not fully supported yet][win64], and all executables created by rustc [depends on libgcc DLL at runtime][libgcc].
3535

3636
[win64]: https://github.com/rust-lang/rust/issues/1237
3737
[libgcc]: https://github.com/rust-lang/rust/issues/11782
@@ -68,7 +68,7 @@ Cleanup through RAII-style destructors is more likely to work than in catch bloc
6868

6969
## Why aren't modules type-parametric?
7070

71-
We want to maintain the option to parametrize at runtime. We may eventually change this limitation, but initially this is how type parameters were implemented.
71+
We want to maintain the option to parametrize at runtime. We may make eventually change this limitation, but initially this is how type parameters were implemented.
7272

7373
## Why aren't values type-parametric? Why only items?
7474

branches/try/src/doc/guide-lifetimes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Now we can call `compute_distance()`:
6767
# let on_the_stack : Point = Point{x: 3.0, y: 4.0};
6868
# let on_the_heap : Box<Point> = box Point{x: 7.0, y: 9.0};
6969
# fn compute_distance(p1: &Point, p2: &Point) -> f64 { 0.0 }
70-
compute_distance(&on_the_stack, &*on_the_heap);
70+
compute_distance(&on_the_stack, on_the_heap);
7171
~~~
7272

7373
Here, the `&` operator takes the address of the variable
@@ -77,9 +77,10 @@ value. We also call this _borrowing_ the local variable
7777
`on_the_stack`, because we have created an alias: that is, another
7878
name for the same data.
7979

80-
Likewise, in the case of `owned_box`,
81-
the `&` operator is used in conjunction with the `*` operator
82-
to take a reference to the contents of the box.
80+
In the case of `on_the_heap`, however, no explicit action is necessary.
81+
The compiler will automatically convert a box point to a reference like &point.
82+
This is another form of borrowing; in this case, the contents of the owned box
83+
are being lent out.
8384

8485
Whenever a caller lends data to a callee, there are some limitations on what
8586
the caller can do with the original. For example, if the contents of a

branches/try/src/doc/guide-pointers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fn main() {
279279
let origin = &Point { x: 0.0, y: 0.0 };
280280
let p1 = box Point { x: 5.0, y: 3.0 };
281281

282-
println!("{}", compute_distance(origin, &*p1));
282+
println!("{}", compute_distance(origin, p1));
283283
}
284284
~~~
285285

branches/try/src/doc/guide-strings.md

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

branches/try/src/doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ li {list-style-type: none; }
1313

1414
# Guides
1515

16-
* [Strings](guide-strings.html)
1716
* [Pointers](guide-pointers.html)
1817
* [References and Lifetimes](guide-lifetimes.html)
1918
* [Containers and Iterators](guide-container.html)

branches/try/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3243,7 +3243,7 @@ enum List { Nil, Cons(uint, Box<List>) }
32433243
fn is_sorted(list: &List) -> bool {
32443244
match *list {
32453245
Nil | Cons(_, box Nil) => true,
3246-
Cons(x, ref r @ box Cons(y, _)) => (x <= y) && is_sorted(&**r)
3246+
Cons(x, ref r @ box Cons(y, _)) => (x <= y) && is_sorted(*r)
32473247
}
32483248
}
32493249

branches/try/src/doc/tutorial.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ Now we can call `compute_distance()` in various ways:
14701470
# let on_the_stack : Point = Point { x: 3.0, y: 4.0 };
14711471
# let on_the_heap : Box<Point> = box Point { x: 7.0, y: 9.0 };
14721472
# fn compute_distance(p1: &Point, p2: &Point) -> f64 { 0.0 }
1473-
compute_distance(&on_the_stack, &*on_the_heap);
1473+
compute_distance(&on_the_stack, on_the_heap);
14741474
~~~
14751475

14761476
Here the `&` operator is used to take the address of the variable
@@ -1480,9 +1480,11 @@ reference. We also call this _borrowing_ the local variable
14801480
`on_the_stack`, because we are creating an alias: that is, another
14811481
route to the same data.
14821482

1483-
Likewise, in the case of `owned_box`,
1484-
the `&` operator is used in conjunction with the `*` operator
1485-
to take a reference to the contents of the box.
1483+
In the case of `owned_box`, however, no
1484+
explicit action is necessary. The compiler will automatically convert
1485+
a box `box point` to a reference like
1486+
`&point`. This is another form of borrowing; in this case, the
1487+
contents of the owned box are being lent out.
14861488

14871489
Whenever a value is borrowed, there are some limitations on what you
14881490
can do with the original. For example, if the contents of a variable

branches/try/src/liballoc/boxed.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<T:PartialEq> PartialEq for Box<T> {
6767
impl<T:PartialOrd> PartialOrd for Box<T> {
6868
#[inline]
6969
fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering> {
70-
(**self).partial_cmp(&**other)
70+
(**self).partial_cmp(*other)
7171
}
7272
#[inline]
7373
fn lt(&self, other: &Box<T>) -> bool { *(*self) < *(*other) }
@@ -80,9 +80,7 @@ impl<T:PartialOrd> PartialOrd for Box<T> {
8080
}
8181
impl<T: Ord> Ord for Box<T> {
8282
#[inline]
83-
fn cmp(&self, other: &Box<T>) -> Ordering {
84-
(**self).cmp(&**other)
85-
}
83+
fn cmp(&self, other: &Box<T>) -> Ordering { (**self).cmp(*other) }
8684
}
8785
impl<T: Eq> Eq for Box<T> {}
8886

branches/try/src/libcollections/btree.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,12 @@ impl<K: Clone + Ord, V: Clone> Leaf<K, V> {
365365
return (Node::new_leaf(self.clone().elts), false);
366366
}
367367
//If there is an index, insert at that index.
368-
Some(i) => {
369-
if i >= self.elts.len() {
368+
_ => {
369+
if index.unwrap() >= self.elts.len() {
370370
self.elts.push(to_insert.clone());
371371
}
372372
else {
373-
self.elts.insert(i, to_insert.clone());
373+
self.elts.insert(index.unwrap(), to_insert.clone());
374374
}
375375
}
376376
}
@@ -526,16 +526,16 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
526526
self.clone().rightmost_child),
527527
outcome);
528528
}
529-
Some(i) => {
530-
if i == self.elts.len() {
529+
_ => {
530+
if index.unwrap() == self.elts.len() {
531531
let new_outcome = self.clone().rightmost_child.insert(k.clone(),
532532
v.clone(),
533533
ub.clone());
534534
new_branch = new_outcome.clone().val0();
535535
outcome = new_outcome.val1();
536536
}
537537
else {
538-
let new_outcome = self.elts.get(i).left.clone().insert(k.clone(),
538+
let new_outcome = self.elts.get(index.unwrap()).left.clone().insert(k.clone(),
539539
v.clone(),
540540
ub.clone());
541541
new_branch = new_outcome.clone().val0();
@@ -547,11 +547,11 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
547547
//If we have a leaf, we do not need to resize the tree,
548548
//so we can return false.
549549
LeafNode(..) => {
550-
if i == self.elts.len() {
550+
if index.unwrap() == self.elts.len() {
551551
self.rightmost_child = box new_branch.clone();
552552
}
553553
else {
554-
self.elts.get_mut(i).left = box new_branch.clone();
554+
self.elts.get_mut(index.unwrap()).left = box new_branch.clone();
555555
}
556556
return (Node::new_branch(self.clone().elts,
557557
self.clone().rightmost_child),
@@ -589,13 +589,13 @@ impl<K: Clone + Ord, V: Clone> Branch<K, V> {
589589
self.clone().rightmost_child),
590590
false);
591591
}
592-
Some(i) => {
593-
self.elts.insert(i, new_elt);
594-
if i + 1 >= self.elts.len() {
592+
_ => {
593+
self.elts.insert(new_elt_index.unwrap(), new_elt);
594+
if new_elt_index.unwrap() + 1 >= self.elts.len() {
595595
self.rightmost_child = branch.clone().rightmost_child;
596596
}
597597
else {
598-
self.elts.get_mut(i + 1).left =
598+
self.elts.get_mut(new_elt_index.unwrap() + 1).left =
599599
branch.clone().rightmost_child;
600600
}
601601
}

0 commit comments

Comments
 (0)