Skip to content

Commit 9c54ee1

Browse files
committed
---
yaml --- r: 232798 b: refs/heads/try c: 3a80411 h: refs/heads/master v: v3
1 parent a814a90 commit 9c54ee1

File tree

66 files changed

+1119
-623
lines changed

Some content is hidden

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

66 files changed

+1119
-623
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 595fda0de7fda252559b717e2e56b3b1eef1961e
4+
refs/heads/try: 3a804114158dbde947cd9fffc2ad28be9c1dd14c
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version)
294294
LLVM_BINDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --bindir)
295295
LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
296296
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
297-
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L "$$(LLVM_LIBDIR_$(1))"
297+
LLVM_LIBDIR_RUSTFLAGS_$(1)=-L native="$$(LLVM_LIBDIR_$(1))"
298298
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
299299
ifeq ($$(findstring freebsd,$(1)),freebsd)
300300
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,26 @@ And that's reflected in the summary line:
120120
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
121121
```
122122

123-
We also get a non-zero status code:
123+
We also get a non-zero status code. We can use `$?` on OS X and Linux:
124124

125125
```bash
126126
$ echo $?
127127
101
128128
```
129129

130+
On Windows, if you’re using `cmd`:
131+
132+
```bash
133+
> echo %ERRORLEVEL%
134+
```
135+
136+
And if you’re using PowerShell:
137+
138+
```bash
139+
> echo $LASTEXITCODE # the code itself
140+
> echo $? # a boolean, fail or succeed
141+
```
142+
130143
This is useful if you want to integrate `cargo test` into other tooling.
131144

132145
We can invert our test's failure with another attribute: `should_panic`:

branches/try/src/libcollections/btree/map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use core::fmt::Debug;
2222
use core::hash::{Hash, Hasher};
2323
use core::iter::{Map, FromIterator};
2424
use core::ops::Index;
25-
use core::{iter, fmt, mem, usize};
25+
use core::{fmt, mem, usize};
2626
use Bound::{self, Included, Excluded, Unbounded};
2727

2828
use borrow::Borrow;
@@ -915,15 +915,15 @@ impl<K: Eq, V: Eq> Eq for BTreeMap<K, V> {}
915915
impl<K: PartialOrd, V: PartialOrd> PartialOrd for BTreeMap<K, V> {
916916
#[inline]
917917
fn partial_cmp(&self, other: &BTreeMap<K, V>) -> Option<Ordering> {
918-
iter::order::partial_cmp(self.iter(), other.iter())
918+
self.iter().partial_cmp(other.iter())
919919
}
920920
}
921921

922922
#[stable(feature = "rust1", since = "1.0.0")]
923923
impl<K: Ord, V: Ord> Ord for BTreeMap<K, V> {
924924
#[inline]
925925
fn cmp(&self, other: &BTreeMap<K, V>) -> Ordering {
926-
iter::order::cmp(self.iter(), other.iter())
926+
self.iter().cmp(other.iter())
927927
}
928928
}
929929

branches/try/src/libcollections/linked_list.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use alloc::boxed::Box;
2525
use core::cmp::Ordering;
2626
use core::fmt;
2727
use core::hash::{Hasher, Hash};
28-
use core::iter::{self, FromIterator};
28+
use core::iter::FromIterator;
2929
use core::mem;
3030
use core::ptr;
3131

@@ -917,12 +917,12 @@ impl<'a, T: 'a + Copy> Extend<&'a T> for LinkedList<T> {
917917
impl<A: PartialEq> PartialEq for LinkedList<A> {
918918
fn eq(&self, other: &LinkedList<A>) -> bool {
919919
self.len() == other.len() &&
920-
iter::order::eq(self.iter(), other.iter())
920+
self.iter().eq(other.iter())
921921
}
922922

923923
fn ne(&self, other: &LinkedList<A>) -> bool {
924924
self.len() != other.len() ||
925-
iter::order::ne(self.iter(), other.iter())
925+
self.iter().ne(other.iter())
926926
}
927927
}
928928

@@ -932,15 +932,15 @@ impl<A: Eq> Eq for LinkedList<A> {}
932932
#[stable(feature = "rust1", since = "1.0.0")]
933933
impl<A: PartialOrd> PartialOrd for LinkedList<A> {
934934
fn partial_cmp(&self, other: &LinkedList<A>) -> Option<Ordering> {
935-
iter::order::partial_cmp(self.iter(), other.iter())
935+
self.iter().partial_cmp(other.iter())
936936
}
937937
}
938938

939939
#[stable(feature = "rust1", since = "1.0.0")]
940940
impl<A: Ord> Ord for LinkedList<A> {
941941
#[inline]
942942
fn cmp(&self, other: &LinkedList<A>) -> Ordering {
943-
iter::order::cmp(self.iter(), other.iter())
943+
self.iter().cmp(other.iter())
944944
}
945945
}
946946

branches/try/src/libcollections/string.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -769,18 +769,27 @@ impl fmt::Display for FromUtf16Error {
769769

770770
#[stable(feature = "rust1", since = "1.0.0")]
771771
impl FromIterator<char> for String {
772-
fn from_iter<I: IntoIterator<Item=char>>(iter: I) -> String {
772+
fn from_iter<I: IntoIterator<Item=char>>(iterable: I) -> String {
773773
let mut buf = String::new();
774-
buf.extend(iter);
774+
buf.extend(iterable);
775775
buf
776776
}
777777
}
778778

779779
#[stable(feature = "rust1", since = "1.0.0")]
780780
impl<'a> FromIterator<&'a str> for String {
781-
fn from_iter<I: IntoIterator<Item=&'a str>>(iter: I) -> String {
781+
fn from_iter<I: IntoIterator<Item=&'a str>>(iterable: I) -> String {
782782
let mut buf = String::new();
783-
buf.extend(iter);
783+
buf.extend(iterable);
784+
buf
785+
}
786+
}
787+
788+
#[stable(feature = "extend_string", since = "1.4.0")]
789+
impl FromIterator<String> for String {
790+
fn from_iter<I: IntoIterator<Item=String>>(iterable: I) -> String {
791+
let mut buf = String::new();
792+
buf.extend(iterable);
784793
buf
785794
}
786795
}
@@ -799,8 +808,8 @@ impl Extend<char> for String {
799808

800809
#[stable(feature = "extend_ref", since = "1.2.0")]
801810
impl<'a> Extend<&'a char> for String {
802-
fn extend<I: IntoIterator<Item=&'a char>>(&mut self, iter: I) {
803-
self.extend(iter.into_iter().cloned());
811+
fn extend<I: IntoIterator<Item=&'a char>>(&mut self, iterable: I) {
812+
self.extend(iterable.into_iter().cloned());
804813
}
805814
}
806815

@@ -813,6 +822,15 @@ impl<'a> Extend<&'a str> for String {
813822
}
814823
}
815824

825+
#[stable(feature = "extend_string", since = "1.4.0")]
826+
impl Extend<String> for String {
827+
fn extend<I: IntoIterator<Item=String>>(&mut self, iterable: I) {
828+
for s in iterable {
829+
self.push_str(&s)
830+
}
831+
}
832+
}
833+
816834
/// A convenience impl that delegates to the impl for `&str`
817835
impl<'a, 'b> Pattern<'a> for &'b String {
818836
type Searcher = <&'b str as Pattern<'a>>::Searcher;

branches/try/src/libcollections/vec_deque.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
use core::cmp::Ordering;
2222
use core::fmt;
23-
use core::iter::{self, repeat, FromIterator};
23+
use core::iter::{repeat, FromIterator};
2424
use core::ops::{Index, IndexMut};
2525
use core::ptr;
2626
use core::slice;
@@ -1676,15 +1676,15 @@ impl<A: Eq> Eq for VecDeque<A> {}
16761676
#[stable(feature = "rust1", since = "1.0.0")]
16771677
impl<A: PartialOrd> PartialOrd for VecDeque<A> {
16781678
fn partial_cmp(&self, other: &VecDeque<A>) -> Option<Ordering> {
1679-
iter::order::partial_cmp(self.iter(), other.iter())
1679+
self.iter().partial_cmp(other.iter())
16801680
}
16811681
}
16821682

16831683
#[stable(feature = "rust1", since = "1.0.0")]
16841684
impl<A: Ord> Ord for VecDeque<A> {
16851685
#[inline]
16861686
fn cmp(&self, other: &VecDeque<A>) -> Ordering {
1687-
iter::order::cmp(self.iter(), other.iter())
1687+
self.iter().cmp(other.iter())
16881688
}
16891689
}
16901690

branches/try/src/libcore/default.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
7979
#![stable(feature = "rust1", since = "1.0.0")]
8080

81-
/// A trait that types which have a useful default value should implement.
81+
/// A trait for giving a type a useful default value.
8282
///
8383
/// A struct can derive default implementations of `Default` for basic types using
8484
/// `#[derive(Default)]`.

0 commit comments

Comments
 (0)