Skip to content

Commit bcb1a0b

Browse files
committed
---
yaml --- r: 274106 b: refs/heads/stable c: 7ffd408 h: refs/heads/master
1 parent 6128714 commit bcb1a0b

File tree

111 files changed

+2048
-2865
lines changed

Some content is hidden

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

111 files changed

+2048
-2865
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 51108b64ca3c84d9973736e6b9e094e79c12dc60
32+
refs/heads/stable: 7ffd408d86e3fc9b8e9aafaef20ec4e096f1b55b
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ CFG_SELF="$0"
550550
CFG_CONFIGURE_ARGS="$@"
551551

552552

553-
case "${CFG_SRC_DIR}" in
553+
case "${CFG_SRC_DIR}" in
554554
*\ * )
555555
err "The path to the rust source directory contains spaces, which is not supported"
556556
;;
@@ -892,13 +892,6 @@ then
892892
CFG_DISABLE_JEMALLOC=1
893893
fi
894894

895-
if [ $CFG_OSTYPE = pc-windows-gnu ]
896-
then
897-
# FIXME(#31030) - there's not a great reason to disable jemalloc here
898-
step_msg "on Windows, disabling jemalloc"
899-
CFG_DISABLE_JEMALLOC=1
900-
fi
901-
902895
# OS X 10.9, gcc is actually clang. This can cause some confusion in the build
903896
# system, so if we find that gcc is clang, we should just use clang directly.
904897
if [ $CFG_OSTYPE = apple-darwin -a -z "$CFG_ENABLE_CLANG" ]
@@ -1042,7 +1035,7 @@ then
10421035
if [ -n "$CFG_OSX_CLANG_VERSION" ]
10431036
then
10441037
case $CFG_OSX_CLANG_VERSION in
1045-
(7.0* | 7.1* | 7.2*)
1038+
(7.0*)
10461039
step_msg "found ok version of APPLE CLANG: $CFG_OSX_CLANG_VERSION"
10471040
;;
10481041
(*)

branches/stable/src/doc/book/lifetimes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is
353353
fn get_mut(&mut self) -> &mut T; // elided
354354
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
355355
356-
fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
357-
fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
356+
fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command; // elided
357+
fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command; // expanded
358358
359359
fn new(buf: &mut [u8]) -> BufWriter; // elided
360360
fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a>; // expanded

branches/stable/src/doc/book/macros.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,9 @@ This expands to
285285

286286
```text
287287
const char *state = "reticulating splines";
288-
{
289-
int state = get_log_state();
290-
if (state > 0) {
291-
printf("log(%d): %s\n", state, state);
292-
}
288+
int state = get_log_state();
289+
if (state > 0) {
290+
printf("log(%d): %s\n", state, state);
293291
}
294292
```
295293

branches/stable/src/doc/nomicon/lifetime-elision.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ fn frob(s: &str, t: &str) -> &str; // ILLEGAL
5555
fn get_mut(&mut self) -> &mut T; // elided
5656
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded
5757
58-
fn args<T: ToCStr>(&mut self, args: &[T]) -> &mut Command // elided
59-
fn args<'a, 'b, T: ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
58+
fn args<T:ToCStr>(&mut self, args: &[T]) -> &mut Command // elided
59+
fn args<'a, 'b, T:ToCStr>(&'a mut self, args: &'b [T]) -> &'a mut Command // expanded
6060
6161
fn new(buf: &mut [u8]) -> BufWriter; // elided
6262
fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> // expanded

branches/stable/src/jemalloc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit e24a1a025a1f214e40eedafe3b9c7b1d69937922
1+
Subproject commit f84e30927284b0c500ed3eaf09e8e159da20ddaf

branches/stable/src/libcollections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,6 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10271027
}
10281028
self.node.as_leaf_mut().len -= 1;
10291029

1030-
left_node.as_leaf_mut().len += right_len as u16 + 1;
1031-
10321030
if self.node.height > 1 {
10331031
ptr::copy_nonoverlapping(
10341032
right_node.cast_unchecked().as_internal().edges.as_ptr(),
@@ -1060,6 +1058,8 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
10601058
);
10611059
}
10621060

1061+
left_node.as_leaf_mut().len += right_len as u16 + 1;
1062+
10631063
Handle::new_edge(self.node, self.idx)
10641064
}
10651065
}

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

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use core::cmp::Ordering::{self, Less, Greater, Equal};
1515
use core::fmt::Debug;
1616
use core::fmt;
17-
use core::iter::{Peekable, FromIterator};
17+
use core::iter::{Peekable, Map, FromIterator};
1818
use core::ops::{BitOr, BitAnd, BitXor, Sub};
1919

2020
use borrow::Borrow;
@@ -52,12 +52,12 @@ pub struct Iter<'a, T: 'a> {
5252
/// An owning iterator over a BTreeSet's items.
5353
#[stable(feature = "rust1", since = "1.0.0")]
5454
pub struct IntoIter<T> {
55-
iter: ::btree_map::IntoIter<T, ()>,
55+
iter: Map<::btree_map::IntoIter<T, ()>, fn((T, ())) -> T>,
5656
}
5757

5858
/// An iterator over a sub-range of BTreeSet's items.
5959
pub struct Range<'a, T: 'a> {
60-
iter: ::btree_map::Range<'a, T, ()>,
60+
iter: Map<::btree_map::Range<'a, T, ()>, fn((&'a T, &'a ())) -> &'a T>,
6161
}
6262

6363
/// A lazy iterator producing elements in the set difference (in-order).
@@ -160,7 +160,12 @@ impl<T: Ord> BTreeSet<T> {
160160
-> Range<'a, T>
161161
where T: Borrow<Min> + Borrow<Max>
162162
{
163-
Range { iter: self.map.range(min, max) }
163+
fn first<A, B>((a, _): (A, B)) -> A {
164+
a
165+
}
166+
let first: fn((&'a T, &'a ())) -> &'a T = first; // coerce to fn pointer
167+
168+
Range { iter: self.map.range(min, max).map(first) }
164169
}
165170
}
166171

@@ -543,7 +548,12 @@ impl<T> IntoIterator for BTreeSet<T> {
543548
/// assert_eq!(v, [1, 2, 3, 4]);
544549
/// ```
545550
fn into_iter(self) -> IntoIter<T> {
546-
IntoIter { iter: self.map.into_iter() }
551+
fn first<A, B>((a, _): (A, B)) -> A {
552+
a
553+
}
554+
let first: fn((T, ())) -> T = first; // coerce to fn pointer
555+
556+
IntoIter { iter: self.map.into_iter().map(first) }
547557
}
548558
}
549559

@@ -711,7 +721,7 @@ impl<T> Iterator for IntoIter<T> {
711721
type Item = T;
712722

713723
fn next(&mut self) -> Option<T> {
714-
self.iter.next().map(|(k, _)| k)
724+
self.iter.next()
715725
}
716726
fn size_hint(&self) -> (usize, Option<usize>) {
717727
self.iter.size_hint()
@@ -720,7 +730,7 @@ impl<T> Iterator for IntoIter<T> {
720730
#[stable(feature = "rust1", since = "1.0.0")]
721731
impl<T> DoubleEndedIterator for IntoIter<T> {
722732
fn next_back(&mut self) -> Option<T> {
723-
self.iter.next_back().map(|(k, _)| k)
733+
self.iter.next_back()
724734
}
725735
}
726736
#[stable(feature = "rust1", since = "1.0.0")]
@@ -736,12 +746,12 @@ impl<'a, T> Iterator for Range<'a, T> {
736746
type Item = &'a T;
737747

738748
fn next(&mut self) -> Option<&'a T> {
739-
self.iter.next().map(|(k, _)| k)
749+
self.iter.next()
740750
}
741751
}
742752
impl<'a, T> DoubleEndedIterator for Range<'a, T> {
743753
fn next_back(&mut self) -> Option<&'a T> {
744-
self.iter.next_back().map(|(k, _)| k)
754+
self.iter.next_back()
745755
}
746756
}
747757

branches/stable/src/libcollections/fmt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@
348348
//! The fill character is provided normally in conjunction with the `width`
349349
//! parameter. This indicates that if the value being formatted is smaller than
350350
//! `width` some extra characters will be printed around it. The extra
351-
//! characters are specified by `fill`, and the alignment can be one of the
352-
//! following options:
351+
//! characters are specified by `fill`, and the alignment can be one of two
352+
//! options:
353353
//!
354354
//! * `<` - the argument is left-aligned in `width` columns
355355
//! * `^` - the argument is center-aligned in `width` columns

branches/stable/src/libcollections/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ impl str {
302302
/// # Safety
303303
///
304304
/// Callers of this function are responsible that three preconditions are
305-
/// satisfied:
305+
/// satisifed:
306306
///
307307
/// * `begin` must come before `end`.
308308
/// * `begin` and `end` must be byte positions within the string slice.
@@ -345,7 +345,7 @@ impl str {
345345
/// # Safety
346346
///
347347
/// Callers of this function are responsible that three preconditions are
348-
/// satisfied:
348+
/// satisifed:
349349
///
350350
/// * `begin` must come before `end`.
351351
/// * `begin` and `end` must be byte positions within the string slice.

branches/stable/src/libcollectionstest/btree/set.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,3 @@ fn test_recovery() {
254254

255255
assert_eq!(s.iter().next(), None);
256256
}
257-
258-
#[test]
259-
fn test_variance() {
260-
use std::collections::btree_set::{IntoIter, Iter, Range};
261-
262-
fn set<'new>(v: BTreeSet<&'static str>) -> BTreeSet<&'new str> { v }
263-
fn iter<'a, 'new>(v: Iter<'a, &'static str>) -> Iter<'a, &'new str> { v }
264-
fn into_iter<'new>(v: IntoIter<&'static str>) -> IntoIter<&'new str> { v }
265-
fn range<'a, 'new>(v: Range<'a, &'static str>) -> Range<'a, &'new str> { v }
266-
}

branches/stable/src/libcore/marker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ macro_rules! impls{
333333
/// use std::marker::PhantomData;
334334
///
335335
/// # #[allow(dead_code)]
336-
/// struct Slice<'a, T: 'a> {
336+
/// struct Slice<'a, T:'a> {
337337
/// start: *const T,
338338
/// end: *const T,
339339
/// phantom: PhantomData<&'a T>
@@ -428,18 +428,18 @@ mod impls {
428428
/// use std::any::Any;
429429
///
430430
/// # #[allow(dead_code)]
431-
/// fn foo<T: Reflect + 'static>(x: &T) {
431+
/// fn foo<T:Reflect+'static>(x: &T) {
432432
/// let any: &Any = x;
433433
/// if any.is::<u32>() { println!("u32"); }
434434
/// }
435435
/// ```
436436
///
437-
/// Without the declaration `T: Reflect`, `foo` would not type check
437+
/// Without the declaration `T:Reflect`, `foo` would not type check
438438
/// (note: as a matter of style, it would be preferable to write
439-
/// `T: Any`, because `T: Any` implies `T: Reflect` and `T: 'static`, but
439+
/// `T:Any`, because `T:Any` implies `T:Reflect` and `T:'static`, but
440440
/// we use `Reflect` here to show how it works). The `Reflect` bound
441441
/// thus serves to alert `foo`'s caller to the fact that `foo` may
442-
/// behave differently depending on whether `T = u32` or not. In
442+
/// behave differently depending on whether `T=u32` or not. In
443443
/// particular, thanks to the `Reflect` bound, callers know that a
444444
/// function declared like `fn bar<T>(...)` will always act in
445445
/// precisely the same way no matter what type `T` is supplied,

0 commit comments

Comments
 (0)