Skip to content

Commit e8f71d6

Browse files
committed
---
yaml --- r: 232796 b: refs/heads/try c: 20a8412 h: refs/heads/master v: v3
1 parent 520a1ec commit e8f71d6

File tree

46 files changed

+837
-358
lines changed

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

+837
-358
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: 8af543af5d4588a5b9d32fd01e8888fcf3e258aa
4+
refs/heads/try: 20a8412e09e2883489736b4ae3dc138f243d1a17
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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/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)