Skip to content

Commit

Permalink
Merge pull request #35914 from alexcrichton/beta-next
Browse files Browse the repository at this point in the history
Backport PRs to beta
  • Loading branch information
brson committed Aug 24, 2016
2 parents 822166b + 7bac1cb commit 389dad7
Show file tree
Hide file tree
Showing 21 changed files with 379 additions and 94 deletions.
177 changes: 177 additions & 0 deletions RELEASES.md
@@ -1,3 +1,180 @@
Version 1.11.0 (2016-08-18)
===========================

Language
--------

* [`cfg_attr` works on `path` attributes]
(https://github.com/rust-lang/rust/pull/34546)
* [Support nested `cfg_attr` attributes]
(https://github.com/rust-lang/rust/pull/34216)
* [Allow statement-generating braced macro invocations at the end of blocks]
(https://github.com/rust-lang/rust/pull/34436)
* [Macros can be expanded inside of trait definitions]
(https://github.com/rust-lang/rust/pull/34213)
* [`#[macro_use]` works properly when it is itself expanded from a macro]
(https://github.com/rust-lang/rust/pull/34032)

Stabilized APIs
---------------

* [`BinaryHeap::append`]
(https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
* [`BTreeMap::append`]
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
* [`BTreeMap::split_off`]
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
* [`BTreeSet::append`]
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
* [`BTreeSet::split_off`]
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
* [`f32::to_degrees`]
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
(in libcore - previously stabilized in libstd)
* [`f32::to_radians`]
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
(in libcore - previously stabilized in libstd)
* [`f64::to_degrees`]
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
(in libcore - previously stabilized in libstd)
* [`f64::to_radians`]
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
(in libcore - previously stabilized in libstd)
* [`Iterator::sum`]
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
* [`Iterator::product`]
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
* [`Cell::get_mut`]
(https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
* [`RefCell::get_mut`]
(https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)

Libraries
---------

* [The `thread_local!` macro supports multiple definitions in a single
invocation, and can apply attributes]
(https://github.com/rust-lang/rust/pull/34077)
* [`Cow` implements `Default`]
(https://github.com/rust-lang/rust/pull/34305)
* [`Wrapping` implements binary, octal, lower-hex and upper-hex
`Display` formatting]
(https://github.com/rust-lang/rust/pull/34190)
* [The range types implement `Hash`]
(https://github.com/rust-lang/rust/pull/34180)
* [`lookup_host` ignores unknown address types]
(https://github.com/rust-lang/rust/pull/34067)
* [`assert_eq!` accepts a custom error message, like `assert!` does]
(https://github.com/rust-lang/rust/pull/33976)
* [The main thread is now called "main" instead of "<main>"]
(https://github.com/rust-lang/rust/pull/33803)

Cargo
-----

* [Disallow specifying features of transitive deps]
(https://github.com/rust-lang/cargo/pull/2821)
* [Add color support for Windows consoles]
(https://github.com/rust-lang/cargo/pull/2804)
* [Fix `harness = false` on `[lib]` sections]
(https://github.com/rust-lang/cargo/pull/2795)
* [Don't panic when `links` contains a '.']
(https://github.com/rust-lang/cargo/pull/2787)
* [Build scripts can emit warnings]
(https://github.com/rust-lang/cargo/pull/2630),
and `-vv` prints warnings for all crates.
* [Ignore file locks on OS X NFS mounts]
(https://github.com/rust-lang/cargo/pull/2720)
* [Don't warn about `package.metadata` keys]
(https://github.com/rust-lang/cargo/pull/2668).
This provides room for expansion by arbitrary tools.
* [Add support for cdylib crate types]
(https://github.com/rust-lang/cargo/pull/2741)
* [Prevent publishing crates when files are dirty]
(https://github.com/rust-lang/cargo/pull/2781)
* [Don't fetch all crates on clean]
(https://github.com/rust-lang/cargo/pull/2704)
* [Propagate --color option to rustc]
(https://github.com/rust-lang/cargo/pull/2779)
* [Fix `cargo doc --open` on Windows]
(https://github.com/rust-lang/cargo/pull/2780)
* [Improve autocompletion]
(https://github.com/rust-lang/cargo/pull/2772)
* [Configure colors of stderr as well as stdout]
(https://github.com/rust-lang/cargo/pull/2739)

Performance
-----------

* [Caching projections speeds up type check dramatically for some
workloads]
(https://github.com/rust-lang/rust/pull/33816)
* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4]
(https://github.com/rust-lang/rust/pull/33940)
This hasher is faster, but is believed to provide sufficient
protection from collision attacks.
* [Comparison of `Ipv4Addr` is 10x faster]
(https://github.com/rust-lang/rust/pull/33891)

Rustdoc
-------

* [Fix empty implementation section on some module pages]
(https://github.com/rust-lang/rust/pull/34536)
* [Fix inlined renamed reexports in import lists]
(https://github.com/rust-lang/rust/pull/34479)
* [Fix search result layout for enum variants and struct fields]
(https://github.com/rust-lang/rust/pull/34477)
* [Fix issues with source links to external crates]
(https://github.com/rust-lang/rust/pull/34387)
* [Fix redirect pages for renamed reexports]
(https://github.com/rust-lang/rust/pull/34245)

Tooling
-------

* [rustc is better at finding the MSVC toolchain]
(https://github.com/rust-lang/rust/pull/34492)
* [When emitting debug info, rustc emits frame pointers for closures,
shims and glue, as it does for all other functions]
(https://github.com/rust-lang/rust/pull/33909)
* [rust-lldb warns about unsupported versions of LLDB]
(https://github.com/rust-lang/rust/pull/34646)
* Many more errors have been given error codes and extended
explanations
* API documentation continues to be improved, with many new examples

Misc
----

* [rustc no longer hangs when dependencies recursively re-export
submodules]
(https://github.com/rust-lang/rust/pull/34542)
* [rustc requires LLVM 3.7+]
(https://github.com/rust-lang/rust/pull/34104)
* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
rewritten]
(https://github.com/rust-lang/rust/pull/33895)
* [rustc support 16-bit pointer sizes]
(https://github.com/rust-lang/rust/pull/33460).
No targets use this yet, but it works toward AVR support.

Compatibility Notes
-------------------

* [`const`s and `static`s may not have unsized types]
(https://github.com/rust-lang/rust/pull/34443)
* [The new follow-set rules that place restrictions on `macro_rules!`
in order to ensure syntax forward-compatibility have been enabled]
(https://github.com/rust-lang/rust/pull/33982)
This was an [ammendment to RFC 550]
(https://github.com/rust-lang/rfcs/pull/1384),
and has been a warning since 1.10.
* [`cfg` attribute process has been refactored to fix various bugs]
(https://github.com/rust-lang/rust/pull/33706).
This causes breakage in some corner cases.


Version 1.10.0 (2016-07-07)
===========================

Expand Down
2 changes: 1 addition & 1 deletion mk/main.mk
Expand Up @@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.12.0
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
# NB Make sure it starts with a dot to conform to semver pre-release
# versions (section 9)
CFG_PRERELEASE_VERSION=.1
CFG_PRERELEASE_VERSION=.2

ifeq ($(CFG_RELEASE_CHANNEL),stable)
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"
Expand Down
11 changes: 5 additions & 6 deletions src/libcollections/binary_heap.rs
Expand Up @@ -223,27 +223,27 @@ pub struct BinaryHeap<T> {
/// on `BinaryHeap`. See its documentation for details.
///
/// [`peek_mut()`]: struct.BinaryHeap.html#method.peek_mut
#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
pub struct PeekMut<'a, T: 'a + Ord> {
heap: &'a mut BinaryHeap<T>
}

#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
impl<'a, T: Ord> Drop for PeekMut<'a, T> {
fn drop(&mut self) {
self.heap.sift_down(0);
}
}

#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
impl<'a, T: Ord> Deref for PeekMut<'a, T> {
type Target = T;
fn deref(&self) -> &T {
&self.heap.data[0]
}
}

#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
impl<'a, T: Ord> DerefMut for PeekMut<'a, T> {
fn deref_mut(&mut self) -> &mut T {
&mut self.heap.data[0]
Expand Down Expand Up @@ -366,7 +366,6 @@ impl<T: Ord> BinaryHeap<T> {
/// Basic usage:
///
/// ```
/// #![feature(binary_heap_peek_mut)]
/// use std::collections::BinaryHeap;
/// let mut heap = BinaryHeap::new();
/// assert!(heap.peek_mut().is_none());
Expand All @@ -380,7 +379,7 @@ impl<T: Ord> BinaryHeap<T> {
/// }
/// assert_eq!(heap.peek(), Some(&2));
/// ```
#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
pub fn peek_mut(&mut self) -> Option<PeekMut<T>> {
if self.is_empty() {
None
Expand Down
19 changes: 11 additions & 8 deletions src/libcollections/btree/map.rs
Expand Up @@ -1981,8 +1981,6 @@ impl<'a, K: Ord, V> VacantEntry<'a, K, V> {
/// # Examples
///
/// ```
/// #![feature(map_entry_recover_keys)]
///
/// use std::collections::BTreeMap;
/// use std::collections::btree_map::Entry;
///
Expand All @@ -1992,7 +1990,7 @@ impl<'a, K: Ord, V> VacantEntry<'a, K, V> {
/// v.into_key();
/// }
/// ```
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
#[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
pub fn into_key(self) -> K {
self.key
}
Expand Down Expand Up @@ -2074,13 +2072,18 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
self.handle.reborrow().into_kv().0
}

/// Deprecated, renamed to `remove_entry`
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
#[rustc_deprecated(since = "1.12.0", reason = "renamed to `remove_entry`")]
pub fn remove_pair(self) -> (K, V) {
self.remove_entry()
}

/// Take ownership of the key and value from the map.
///
/// # Examples
///
/// ```
/// #![feature(map_entry_recover_keys)]
///
/// use std::collections::BTreeMap;
/// use std::collections::btree_map::Entry;
///
Expand All @@ -2089,14 +2092,14 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
///
/// if let Entry::Occupied(o) = map.entry("poneyland") {
/// // We delete the entry from the map.
/// o.remove_pair();
/// o.remove_entry();
/// }
///
/// // If now try to get the value, it will panic:
/// // println!("{}", map["poneyland"]);
/// ```
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
pub fn remove_pair(self) -> (K, V) {
#[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
pub fn remove_entry(self) -> (K, V) {
self.remove_kv()
}

Expand Down
5 changes: 1 addition & 4 deletions src/libcollections/linked_list.rs
Expand Up @@ -379,8 +379,6 @@ impl<T> LinkedList<T> {
/// # Examples
///
/// ```
/// #![feature(linked_list_contains)]
///
/// use std::collections::LinkedList;
///
/// let mut list: LinkedList<u32> = LinkedList::new();
Expand All @@ -392,8 +390,7 @@ impl<T> LinkedList<T> {
/// assert_eq!(list.contains(&0), true);
/// assert_eq!(list.contains(&10), false);
/// ```
#[unstable(feature = "linked_list_contains", reason = "recently added",
issue = "32630")]
#[stable(feature = "linked_list_contains", since = "1.12.0")]
pub fn contains(&self, x: &T) -> bool
where T: PartialEq<T>
{
Expand Down
15 changes: 9 additions & 6 deletions src/libcollections/vec.rs
Expand Up @@ -1453,10 +1453,11 @@ impl<T> IntoIterator for Vec<T> {
} else {
begin.offset(self.len() as isize) as *const T
};
let buf = ptr::read(&self.buf);
let cap = self.buf.cap();
mem::forget(self);
IntoIter {
_buf: buf,
buf: Shared::new(begin),
cap: cap,
ptr: begin,
end: end,
}
Expand Down Expand Up @@ -1708,8 +1709,9 @@ impl<'a, T> FromIterator<T> for Cow<'a, [T]> where T: Clone {
/// [`IntoIterator`]: ../../std/iter/trait.IntoIterator.html
#[stable(feature = "rust1", since = "1.0.0")]
pub struct IntoIter<T> {
_buf: RawVec<T>,
ptr: *mut T,
buf: Shared<T>,
cap: usize,
ptr: *const T,
end: *const T,
}

Expand Down Expand Up @@ -1750,7 +1752,7 @@ impl<T> IntoIter<T> {
#[unstable(feature = "vec_into_iter_as_slice", issue = "35601")]
pub fn as_mut_slice(&self) -> &mut [T] {
unsafe {
slice::from_raw_parts_mut(self.ptr, self.len())
slice::from_raw_parts_mut(self.ptr as *mut T, self.len())
}
}
}
Expand Down Expand Up @@ -1846,9 +1848,10 @@ impl<T> Drop for IntoIter<T> {
#[unsafe_destructor_blind_to_params]
fn drop(&mut self) {
// destroy the remaining elements
for _x in self {}
for _x in self.by_ref() {}

// RawVec handles deallocation
let _ = unsafe { RawVec::from_raw_parts(*self.buf, self.cap) };
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/libcollections/vec_deque.rs
Expand Up @@ -938,8 +938,6 @@ impl<T> VecDeque<T> {
/// # Examples
///
/// ```
/// #![feature(vec_deque_contains)]
///
/// use std::collections::VecDeque;
///
/// let mut vector: VecDeque<u32> = VecDeque::new();
Expand All @@ -950,8 +948,7 @@ impl<T> VecDeque<T> {
/// assert_eq!(vector.contains(&1), true);
/// assert_eq!(vector.contains(&10), false);
/// ```
#[unstable(feature = "vec_deque_contains", reason = "recently added",
issue = "32630")]
#[stable(feature = "vec_deque_contains", since = "1.12.0")]
pub fn contains(&self, x: &T) -> bool
where T: PartialEq<T>
{
Expand Down

0 comments on commit 389dad7

Please sign in to comment.