Skip to content

Commit 8d5b876

Browse files
committed
---
yaml --- r: 124587 b: refs/heads/auto c: b2a02b5 h: refs/heads/master i: 124585: 2ee6bec 124583: e21fc7f v: v3
1 parent e001913 commit 8d5b876

File tree

105 files changed

+1203
-2766
lines changed

Some content is hidden

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

105 files changed

+1203
-2766
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: ca3843482928a1acf9482aa2e6cb29a850392ac7
16+
refs/heads/auto: b2a02b580d4193a75e4aacdd58e87805437480c5
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libcollections/dlist.rs

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -278,23 +278,6 @@ impl<T> DList<T> {
278278
/// Move the last element to the front of the list.
279279
///
280280
/// If the list is empty, do nothing.
281-
///
282-
/// # Example
283-
///
284-
/// ```rust
285-
/// use std::collections::{DList, Deque};
286-
///
287-
/// let mut dl = DList::new();
288-
/// dl.push_back(1i);
289-
/// dl.push_back(2);
290-
/// dl.push_back(3);
291-
///
292-
/// dl.rotate_forward();
293-
///
294-
/// for e in dl.iter() {
295-
/// println!("{}", e); // prints 3, then 1, then 2
296-
/// }
297-
/// ```
298281
#[inline]
299282
pub fn rotate_forward(&mut self) {
300283
self.pop_back_node().map(|tail| {
@@ -305,23 +288,6 @@ impl<T> DList<T> {
305288
/// Move the first element to the back of the list.
306289
///
307290
/// If the list is empty, do nothing.
308-
///
309-
/// # Example
310-
///
311-
/// ```rust
312-
/// use std::collections::{DList, Deque};
313-
///
314-
/// let mut dl = DList::new();
315-
/// dl.push_back(1i);
316-
/// dl.push_back(2);
317-
/// dl.push_back(3);
318-
///
319-
/// dl.rotate_backward();
320-
///
321-
/// for e in dl.iter() {
322-
/// println!("{}", e); // prints 2, then 3, then 1
323-
/// }
324-
/// ```
325291
#[inline]
326292
pub fn rotate_backward(&mut self) {
327293
self.pop_front_node().map(|head| {
@@ -332,25 +298,6 @@ impl<T> DList<T> {
332298
/// Add all elements from `other` to the end of the list
333299
///
334300
/// O(1)
335-
///
336-
/// # Example
337-
///
338-
/// ```rust
339-
/// use std::collections::{DList, Deque};
340-
///
341-
/// let mut a = DList::new();
342-
/// let mut b = DList::new();
343-
/// a.push_back(1i);
344-
/// a.push_back(2);
345-
/// b.push_back(3i);
346-
/// b.push_back(4);
347-
///
348-
/// a.append(b);
349-
///
350-
/// for e in a.iter() {
351-
/// println!("{}", e); // prints 1, then 2, then 3, then 4
352-
/// }
353-
/// ```
354301
pub fn append(&mut self, mut other: DList<T>) {
355302
match self.list_tail.resolve() {
356303
None => *self = other,
@@ -373,25 +320,6 @@ impl<T> DList<T> {
373320
/// Add all elements from `other` to the beginning of the list
374321
///
375322
/// O(1)
376-
///
377-
/// # Example
378-
///
379-
/// ```rust
380-
/// use std::collections::{DList, Deque};
381-
///
382-
/// let mut a = DList::new();
383-
/// let mut b = DList::new();
384-
/// a.push_back(1i);
385-
/// a.push_back(2);
386-
/// b.push_back(3i);
387-
/// b.push_back(4);
388-
///
389-
/// a.prepend(b);
390-
///
391-
/// for e in a.iter() {
392-
/// println!("{}", e); // prints 3, then 4, then 1, then 2
393-
/// }
394-
/// ```
395323
#[inline]
396324
pub fn prepend(&mut self, mut other: DList<T>) {
397325
mem::swap(self, &mut other);
@@ -402,25 +330,6 @@ impl<T> DList<T> {
402330
/// or at the end.
403331
///
404332
/// O(N)
405-
///
406-
/// # Example
407-
///
408-
/// ```rust
409-
/// use std::collections::{DList, Deque};
410-
///
411-
/// let mut a: DList<int> = DList::new();
412-
/// a.push_back(2i);
413-
/// a.push_back(4);
414-
/// a.push_back(7);
415-
/// a.push_back(8);
416-
///
417-
/// // insert 11 before the first odd number in the list
418-
/// a.insert_when(11, |&e, _| e % 2 == 1);
419-
///
420-
/// for e in a.iter() {
421-
/// println!("{}", e); // prints 2, then 4, then 11, then 7, then 8
422-
/// }
423-
/// ```
424333
pub fn insert_when(&mut self, elt: T, f: |&T, &T| -> bool) {
425334
{
426335
let mut it = self.mut_iter();

branches/auto/src/libcollections/str.rs

Lines changed: 6 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,6 @@ impl OwnedStr for String {
808808
#[cfg(test)]
809809
mod tests {
810810
use std::iter::AdditiveIterator;
811-
use std::iter::range;
812811
use std::default::Default;
813812
use std::char::Char;
814813
use std::clone::Clone;
@@ -1611,30 +1610,6 @@ mod tests {
16111610
assert_eq!(pos, v.len());
16121611
}
16131612

1614-
#[test]
1615-
fn test_chars_decoding() {
1616-
let mut bytes = [0u8, ..4];
1617-
for c in range(0u32, 0x110000).filter_map(|c| ::core::char::from_u32(c)) {
1618-
let len = c.encode_utf8(bytes);
1619-
let s = ::core::str::from_utf8(bytes.slice_to(len)).unwrap();
1620-
if Some(c) != s.chars().next() {
1621-
fail!("character {:x}={} does not decode correctly", c as u32, c);
1622-
}
1623-
}
1624-
}
1625-
1626-
#[test]
1627-
fn test_chars_rev_decoding() {
1628-
let mut bytes = [0u8, ..4];
1629-
for c in range(0u32, 0x110000).filter_map(|c| ::core::char::from_u32(c)) {
1630-
let len = c.encode_utf8(bytes);
1631-
let s = ::core::str::from_utf8(bytes.slice_to(len)).unwrap();
1632-
if Some(c) != s.chars().rev().next() {
1633-
fail!("character {:x}={} does not decode correctly", c as u32, c);
1634-
}
1635-
}
1636-
}
1637-
16381613
#[test]
16391614
fn test_iterator_clone() {
16401615
let s = "ศไทย中华Việt Nam";
@@ -2265,26 +2240,16 @@ mod tests {
22652240
#[cfg(test)]
22662241
mod bench {
22672242
use test::Bencher;
2268-
use test::black_box;
22692243
use super::*;
2270-
use std::option::{None, Some};
22712244
use std::iter::{Iterator, DoubleEndedIterator};
22722245
use std::collections::Collection;
22732246

22742247
#[bench]
22752248
fn char_iterator(b: &mut Bencher) {
22762249
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
2250+
let len = s.char_len();
22772251

2278-
b.iter(|| s.chars().count());
2279-
}
2280-
2281-
#[bench]
2282-
fn char_iterator_for(b: &mut Bencher) {
2283-
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
2284-
2285-
b.iter(|| {
2286-
for ch in s.chars() { black_box(ch) }
2287-
});
2252+
b.iter(|| assert_eq!(s.chars().count(), len));
22882253
}
22892254

22902255
#[bench]
@@ -2295,24 +2260,17 @@ mod bench {
22952260
Mary had a little lamb, Little lamb
22962261
Mary had a little lamb, Little lamb
22972262
Mary had a little lamb, Little lamb";
2263+
let len = s.char_len();
22982264

2299-
b.iter(|| s.chars().count());
2265+
b.iter(|| assert_eq!(s.chars().count(), len));
23002266
}
23012267

23022268
#[bench]
23032269
fn char_iterator_rev(b: &mut Bencher) {
23042270
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
2271+
let len = s.char_len();
23052272

2306-
b.iter(|| s.chars().rev().count());
2307-
}
2308-
2309-
#[bench]
2310-
fn char_iterator_rev_for(b: &mut Bencher) {
2311-
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
2312-
2313-
b.iter(|| {
2314-
for ch in s.chars().rev() { black_box(ch) }
2315-
});
2273+
b.iter(|| assert_eq!(s.chars().rev().count(), len));
23162274
}
23172275

23182276
#[bench]

branches/auto/src/libcore/ops.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -749,23 +749,19 @@ pub trait DerefMut<Result>: Deref<Result> {
749749
#[lang="fn"]
750750
pub trait Fn<Args,Result> {
751751
/// This is called when the call operator is used.
752-
#[rust_call_abi_hack]
753752
fn call(&self, args: Args) -> Result;
754753
}
755754

756755
/// A version of the call operator that takes a mutable receiver.
757756
#[lang="fn_mut"]
758757
pub trait FnMut<Args,Result> {
759758
/// This is called when the call operator is used.
760-
#[rust_call_abi_hack]
761759
fn call_mut(&mut self, args: Args) -> Result;
762760
}
763761

764762
/// A version of the call operator that takes a by-value receiver.
765763
#[lang="fn_once"]
766764
pub trait FnOnce<Args,Result> {
767765
/// This is called when the call operator is used.
768-
#[rust_call_abi_hack]
769766
fn call_once(self, args: Args) -> Result;
770767
}
771-

branches/auto/src/libcore/prelude.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub use ops::{BitAnd, BitOr, BitXor};
3535
pub use ops::{Drop, Deref, DerefMut};
3636
pub use ops::{Shl, Shr};
3737
pub use ops::{Index, IndexMut};
38-
pub use ops::{Fn, FnMut, FnOnce};
3938
pub use option::{Option, Some, None};
4039
pub use result::{Result, Ok, Err};
4140

0 commit comments

Comments
 (0)