Skip to content

Commit ddf35c5

Browse files
committed
---
yaml --- r: 277514 b: refs/heads/try c: e6201cf h: refs/heads/master
1 parent f92f5f0 commit ddf35c5

File tree

32 files changed

+793
-570
lines changed

32 files changed

+793
-570
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: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: d3c2c71988c1b2707c6c2ba19f14dc1ffe6a56fc
4+
refs/heads/try: e6201cfb5cabc636a1dbfb1e543e5485639497a4
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Read ["Installing Rust"] from [The Book].
1616

1717
1. Make sure you have installed the dependencies:
1818

19-
* `g++` 4.7 or later or `clang++` 3.x
19+
* `g++` 4.7 or `clang++` 3.x
2020
* `python` 2.7 (but not 3.x)
2121
* GNU `make` 3.81 or later
2222
* `curl`

branches/try/configure

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,19 +1453,6 @@ then
14531453
cd ${CFG_BUILD_DIR}
14541454
fi
14551455

1456-
# Do a sanity check that the submodule source exists. Because GitHub
1457-
# automatically publishes broken tarballs that can't be disabled, and
1458-
# people download them and try to use them.
1459-
if [ ! -e "${CFG_SRC_DIR}/src/liblibc" ]; then
1460-
err "some submodules are missing. Is this a broken tarball?
1461-
1462-
If you downloaded this tarball from the GitHub release pages at
1463-
https://github.com/rust-lang/rust/releases,
1464-
then please delete it and instead download the source from
1465-
https://www.rust-lang.org/downloads.html"
1466-
1467-
fi
1468-
14691456
# Configure llvm, only if necessary
14701457
step_msg "looking at LLVM"
14711458
CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1654,15 +1654,6 @@ impl<'a, K: Ord, V> Entry<'a, K, V> {
16541654
Vacant(entry) => entry.insert(default()),
16551655
}
16561656
}
1657-
1658-
/// Returns a reference to this entry's key.
1659-
#[unstable(feature = "map_entry_keys", issue = "32281")]
1660-
pub fn key(&self) -> &K {
1661-
match *self {
1662-
Occupied(ref entry) => entry.key(),
1663-
Vacant(ref entry) => entry.key(),
1664-
}
1665-
}
16661657
}
16671658

16681659
impl<'a, K: Ord, V> VacantEntry<'a, K, V> {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,9 @@ impl<T: Ord> BTreeSet<T> {
477477

478478
/// Adds a value to the set.
479479
///
480-
/// If the set did not have this value present, `true` is returned.
480+
/// If the set did not have a value present, `true` is returned.
481481
///
482-
/// If the set did have this value present, `false` is returned, and the
482+
/// If the set did have this key present, `false` is returned, and the
483483
/// entry is not updated. See the [module-level documentation] for more.
484484
///
485485
/// [module-level documentation]: index.html#insert-and-complex-keys

branches/try/src/libcore/iter/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,23 @@ impl<A, B> Iterator for Chain<A, B> where
541541
}
542542
}
543543

544+
#[inline]
545+
fn find<P>(&mut self, mut predicate: P) -> Option<Self::Item> where
546+
P: FnMut(&Self::Item) -> bool,
547+
{
548+
match self.state {
549+
ChainState::Both => match self.a.find(&mut predicate) {
550+
None => {
551+
self.state = ChainState::Back;
552+
self.b.find(predicate)
553+
}
554+
v => v
555+
},
556+
ChainState::Front => self.a.find(predicate),
557+
ChainState::Back => self.b.find(predicate),
558+
}
559+
}
560+
544561
#[inline]
545562
fn last(self) -> Option<A::Item> {
546563
match self.state {

branches/try/src/libcore/num/int_macros.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#![doc(hidden)]
1212

13-
#[cfg(stage0)]
1413
macro_rules! int_module { ($T:ty, $bits:expr) => (
1514

1615
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
@@ -26,15 +25,3 @@ pub const MIN: $T = (-1 as $T) << ($bits - 1);
2625
pub const MAX: $T = !MIN;
2726

2827
) }
29-
30-
#[cfg(not(stage0))]
31-
macro_rules! int_module { ($T:ident, $bits:expr) => (
32-
33-
#[stable(feature = "rust1", since = "1.0.0")]
34-
#[allow(missing_docs)]
35-
pub const MIN: $T = $T::min_value();
36-
#[stable(feature = "rust1", since = "1.0.0")]
37-
#[allow(missing_docs)]
38-
pub const MAX: $T = $T::max_value();
39-
40-
) }

branches/try/src/libcore/num/uint_macros.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#![doc(hidden)]
1212

13-
#[cfg(stage0)]
1413
macro_rules! uint_module { ($T:ty, $bits:expr) => (
1514

1615
#[stable(feature = "rust1", since = "1.0.0")]
@@ -21,15 +20,3 @@ pub const MIN: $T = 0 as $T;
2120
pub const MAX: $T = !0 as $T;
2221

2322
) }
24-
25-
#[cfg(not(stage0))]
26-
macro_rules! uint_module { ($T:ident, $bits:expr) => (
27-
28-
#[stable(feature = "rust1", since = "1.0.0")]
29-
#[allow(missing_docs)]
30-
pub const MIN: $T = $T::min_value();
31-
#[stable(feature = "rust1", since = "1.0.0")]
32-
#[allow(missing_docs)]
33-
pub const MAX: $T = $T::max_value();
34-
35-
) }

branches/try/src/libcoretest/iter.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@ fn test_iterator_chain_count() {
133133
assert_eq!(zs.iter().chain(&ys).count(), 4);
134134
}
135135

136+
#[test]
137+
fn test_iterator_chain_find() {
138+
let xs = [0, 1, 2, 3, 4, 5];
139+
let ys = [30, 40, 50, 60];
140+
let mut iter = xs.iter().chain(&ys);
141+
assert_eq!(iter.find(|&&i| i == 4), Some(&4));
142+
assert_eq!(iter.next(), Some(&5));
143+
assert_eq!(iter.find(|&&i| i == 40), Some(&40));
144+
assert_eq!(iter.next(), Some(&50));
145+
assert_eq!(iter.find(|&&i| i == 100), None);
146+
assert_eq!(iter.next(), None);
147+
}
148+
136149
#[test]
137150
fn test_filter_map() {
138151
let it = (0..).step_by(1).take(10)

0 commit comments

Comments
 (0)