Skip to content

Commit a9be9d0

Browse files
committed
---
yaml --- r: 151153 b: refs/heads/try2 c: bc33006 h: refs/heads/master i: 151151: 60b8d14 v: v3
1 parent eb9201c commit a9be9d0

File tree

6 files changed

+13
-58
lines changed

6 files changed

+13
-58
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: c2b6ab94e23886068a4bbb1679ce24771aa4b25a
8+
refs/heads/try2: bc330063d864d822542ede85ff23d854702675be
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/tutorial.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,11 +1793,6 @@ spawn(proc() {
17931793
});
17941794
~~~~
17951795
1796-
> *Note:* If you want to see the output of `debug!` statements, you will need to turn on
1797-
> `debug!` logging. To enable `debug!` logging, set the RUST_LOG environment
1798-
> variable to the name of your crate, which, for a file named `foo.rs`, will be
1799-
> `foo` (e.g., with bash, `export RUST_LOG=foo`).
1800-
18011796
## Closure compatibility
18021797
18031798
Rust closures have a convenient subtyping property: you can pass any kind of

branches/try2/src/libnum/bigint.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,7 @@ impl Sub<BigUint, BigUint> for BigUint {
230230
lo
231231
}).collect();
232232

233-
assert!(borrow == 0,
234-
"Cannot subtract other from self because other is larger than self.");
233+
assert_eq!(borrow, 0); // <=> assert!((self >= other));
235234
return BigUint::new(diff);
236235
}
237236
}
@@ -1756,13 +1755,6 @@ mod biguint_tests {
17561755
}
17571756
}
17581757

1759-
#[test]
1760-
#[should_fail]
1761-
fn test_sub_fail_on_underflow() {
1762-
let (a, b) : (BigUint, BigUint) = (Zero::zero(), One::one());
1763-
a - b;
1764-
}
1765-
17661758
static mul_triples: &'static [(&'static [BigDigit],
17671759
&'static [BigDigit],
17681760
&'static [BigDigit])] = &[

branches/try2/src/libstd/io/mod.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,21 +1408,7 @@ pub fn standard_error(kind: IoErrorKind) -> IoError {
14081408
EndOfFile => "end of file",
14091409
IoUnavailable => "I/O is unavailable",
14101410
InvalidInput => "invalid input",
1411-
OtherIoError => "unknown I/O error",
1412-
FileNotFound => "file not found",
1413-
PermissionDenied => "permission denied",
1414-
ConnectionFailed => "connection failed",
1415-
Closed => "stream is closed",
1416-
ConnectionRefused => "connection refused",
1417-
ConnectionReset => "connection reset",
1418-
ConnectionAborted => "connection aborted",
1419-
NotConnected => "not connected",
1420-
BrokenPipe => "broken pipe",
1421-
PathAlreadyExists => "file exists",
1422-
PathDoesntExist => "no such file",
1423-
MismatchedFileTypeForOperation => "mismatched file type",
1424-
ResourceUnavailable => "resource unavailable",
1425-
TimedOut => "operation timed out"
1411+
_ => fail!()
14261412
};
14271413
IoError {
14281414
kind: kind,

branches/try2/src/libstd/num/int_macros.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,16 @@ impl Primitive for $T {}
234234

235235
// String conversion functions and impl str -> num
236236

237-
/// Parse a byte slice as a number in the given base
237+
/// Parse a byte slice as a number in the given base.
238238
///
239239
/// Yields an `Option` because `buf` may or may not actually be parseable.
240240
///
241241
/// # Examples
242242
///
243-
/// ```
244-
/// let num = std::i64::parse_bytes([49,50,51,52,53,54,55,56,57], 10);
245-
/// assert!(num == Some(123456789));
243+
/// ```rust
244+
/// let digits = [49,50,51,52,53,54,55,56,57];
245+
/// let base = 10;
246+
/// let num = std::i64::parse_bytes(digits, base);
246247
/// ```
247248
#[inline]
248249
pub fn parse_bytes(buf: &[u8], radix: uint) -> Option<$T> {
@@ -269,16 +270,6 @@ impl FromStrRadix for $T {
269270
// String conversion functions and impl num -> str
270271

271272
/// Convert to a string as a byte slice in a given base.
272-
///
273-
/// Use in place of x.to_str() when you do not need to store the string permanently
274-
///
275-
/// # Examples
276-
///
277-
/// ```
278-
/// std::int::to_str_bytes(123, 10, |v| {
279-
/// assert!(v == "123".as_bytes());
280-
/// });
281-
/// ```
282273
#[inline]
283274
pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U {
284275
// The radix can be as low as 2, so we need at least 64 characters for a

branches/try2/src/libstd/num/uint_macros.rs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,16 @@ impl Int for $T {}
148148

149149
// String conversion functions and impl str -> num
150150

151-
/// Parse a byte slice as a number in the given base
151+
/// Parse a byte slice as a number in the given base.
152152
///
153153
/// Yields an `Option` because `buf` may or may not actually be parseable.
154154
///
155155
/// # Examples
156156
///
157-
/// ```
158-
/// let num = std::uint::parse_bytes([49,50,51,52,53,54,55,56,57], 10);
159-
/// assert!(num == Some(123456789));
157+
/// ```rust
158+
/// let digits = [49,50,51,52,53,54,55,56,57];
159+
/// let base = 10;
160+
/// let num = std::i64::parse_bytes(digits, base);
160161
/// ```
161162
#[inline]
162163
pub fn parse_bytes(buf: &[u8], radix: uint) -> Option<$T> {
@@ -183,16 +184,6 @@ impl FromStrRadix for $T {
183184
// String conversion functions and impl num -> str
184185

185186
/// Convert to a string as a byte slice in a given base.
186-
///
187-
/// Use in place of x.to_str() when you do not need to store the string permanently
188-
///
189-
/// # Examples
190-
///
191-
/// ```
192-
/// std::uint::to_str_bytes(123, 10, |v| {
193-
/// assert!(v == "123".as_bytes());
194-
/// });
195-
/// ```
196187
#[inline]
197188
pub fn to_str_bytes<U>(n: $T, radix: uint, f: |v: &[u8]| -> U) -> U {
198189
// The radix can be as low as 2, so we need at least 64 characters for a

0 commit comments

Comments
 (0)