Skip to content

Commit 404fb33

Browse files
authored
Merge pull request rust-lang#35914 from alexcrichton/beta-next
Backport PRs to beta
2 parents ee1bc49 + b879ed9 commit 404fb33

File tree

21 files changed

+379
-94
lines changed

21 files changed

+379
-94
lines changed

RELEASES.md

+177
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,180 @@
1+
Version 1.11.0 (2016-08-18)
2+
===========================
3+
4+
Language
5+
--------
6+
7+
* [`cfg_attr` works on `path` attributes]
8+
(https://github.com/rust-lang/rust/pull/34546)
9+
* [Support nested `cfg_attr` attributes]
10+
(https://github.com/rust-lang/rust/pull/34216)
11+
* [Allow statement-generating braced macro invocations at the end of blocks]
12+
(https://github.com/rust-lang/rust/pull/34436)
13+
* [Macros can be expanded inside of trait definitions]
14+
(https://github.com/rust-lang/rust/pull/34213)
15+
* [`#[macro_use]` works properly when it is itself expanded from a macro]
16+
(https://github.com/rust-lang/rust/pull/34032)
17+
18+
Stabilized APIs
19+
---------------
20+
21+
* [`BinaryHeap::append`]
22+
(https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
23+
* [`BTreeMap::append`]
24+
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
25+
* [`BTreeMap::split_off`]
26+
(https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
27+
* [`BTreeSet::append`]
28+
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
29+
* [`BTreeSet::split_off`]
30+
(https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
31+
* [`f32::to_degrees`]
32+
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
33+
(in libcore - previously stabilized in libstd)
34+
* [`f32::to_radians`]
35+
(https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
36+
(in libcore - previously stabilized in libstd)
37+
* [`f64::to_degrees`]
38+
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
39+
(in libcore - previously stabilized in libstd)
40+
* [`f64::to_radians`]
41+
(https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
42+
(in libcore - previously stabilized in libstd)
43+
* [`Iterator::sum`]
44+
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
45+
* [`Iterator::product`]
46+
(https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
47+
* [`Cell::get_mut`]
48+
(https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
49+
* [`RefCell::get_mut`]
50+
(https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
51+
52+
Libraries
53+
---------
54+
55+
* [The `thread_local!` macro supports multiple definitions in a single
56+
invocation, and can apply attributes]
57+
(https://github.com/rust-lang/rust/pull/34077)
58+
* [`Cow` implements `Default`]
59+
(https://github.com/rust-lang/rust/pull/34305)
60+
* [`Wrapping` implements binary, octal, lower-hex and upper-hex
61+
`Display` formatting]
62+
(https://github.com/rust-lang/rust/pull/34190)
63+
* [The range types implement `Hash`]
64+
(https://github.com/rust-lang/rust/pull/34180)
65+
* [`lookup_host` ignores unknown address types]
66+
(https://github.com/rust-lang/rust/pull/34067)
67+
* [`assert_eq!` accepts a custom error message, like `assert!` does]
68+
(https://github.com/rust-lang/rust/pull/33976)
69+
* [The main thread is now called "main" instead of "<main>"]
70+
(https://github.com/rust-lang/rust/pull/33803)
71+
72+
Cargo
73+
-----
74+
75+
* [Disallow specifying features of transitive deps]
76+
(https://github.com/rust-lang/cargo/pull/2821)
77+
* [Add color support for Windows consoles]
78+
(https://github.com/rust-lang/cargo/pull/2804)
79+
* [Fix `harness = false` on `[lib]` sections]
80+
(https://github.com/rust-lang/cargo/pull/2795)
81+
* [Don't panic when `links` contains a '.']
82+
(https://github.com/rust-lang/cargo/pull/2787)
83+
* [Build scripts can emit warnings]
84+
(https://github.com/rust-lang/cargo/pull/2630),
85+
and `-vv` prints warnings for all crates.
86+
* [Ignore file locks on OS X NFS mounts]
87+
(https://github.com/rust-lang/cargo/pull/2720)
88+
* [Don't warn about `package.metadata` keys]
89+
(https://github.com/rust-lang/cargo/pull/2668).
90+
This provides room for expansion by arbitrary tools.
91+
* [Add support for cdylib crate types]
92+
(https://github.com/rust-lang/cargo/pull/2741)
93+
* [Prevent publishing crates when files are dirty]
94+
(https://github.com/rust-lang/cargo/pull/2781)
95+
* [Don't fetch all crates on clean]
96+
(https://github.com/rust-lang/cargo/pull/2704)
97+
* [Propagate --color option to rustc]
98+
(https://github.com/rust-lang/cargo/pull/2779)
99+
* [Fix `cargo doc --open` on Windows]
100+
(https://github.com/rust-lang/cargo/pull/2780)
101+
* [Improve autocompletion]
102+
(https://github.com/rust-lang/cargo/pull/2772)
103+
* [Configure colors of stderr as well as stdout]
104+
(https://github.com/rust-lang/cargo/pull/2739)
105+
106+
Performance
107+
-----------
108+
109+
* [Caching projections speeds up type check dramatically for some
110+
workloads]
111+
(https://github.com/rust-lang/rust/pull/33816)
112+
* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4]
113+
(https://github.com/rust-lang/rust/pull/33940)
114+
This hasher is faster, but is believed to provide sufficient
115+
protection from collision attacks.
116+
* [Comparison of `Ipv4Addr` is 10x faster]
117+
(https://github.com/rust-lang/rust/pull/33891)
118+
119+
Rustdoc
120+
-------
121+
122+
* [Fix empty implementation section on some module pages]
123+
(https://github.com/rust-lang/rust/pull/34536)
124+
* [Fix inlined renamed reexports in import lists]
125+
(https://github.com/rust-lang/rust/pull/34479)
126+
* [Fix search result layout for enum variants and struct fields]
127+
(https://github.com/rust-lang/rust/pull/34477)
128+
* [Fix issues with source links to external crates]
129+
(https://github.com/rust-lang/rust/pull/34387)
130+
* [Fix redirect pages for renamed reexports]
131+
(https://github.com/rust-lang/rust/pull/34245)
132+
133+
Tooling
134+
-------
135+
136+
* [rustc is better at finding the MSVC toolchain]
137+
(https://github.com/rust-lang/rust/pull/34492)
138+
* [When emitting debug info, rustc emits frame pointers for closures,
139+
shims and glue, as it does for all other functions]
140+
(https://github.com/rust-lang/rust/pull/33909)
141+
* [rust-lldb warns about unsupported versions of LLDB]
142+
(https://github.com/rust-lang/rust/pull/34646)
143+
* Many more errors have been given error codes and extended
144+
explanations
145+
* API documentation continues to be improved, with many new examples
146+
147+
Misc
148+
----
149+
150+
* [rustc no longer hangs when dependencies recursively re-export
151+
submodules]
152+
(https://github.com/rust-lang/rust/pull/34542)
153+
* [rustc requires LLVM 3.7+]
154+
(https://github.com/rust-lang/rust/pull/34104)
155+
* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
156+
rewritten]
157+
(https://github.com/rust-lang/rust/pull/33895)
158+
* [rustc support 16-bit pointer sizes]
159+
(https://github.com/rust-lang/rust/pull/33460).
160+
No targets use this yet, but it works toward AVR support.
161+
162+
Compatibility Notes
163+
-------------------
164+
165+
* [`const`s and `static`s may not have unsized types]
166+
(https://github.com/rust-lang/rust/pull/34443)
167+
* [The new follow-set rules that place restrictions on `macro_rules!`
168+
in order to ensure syntax forward-compatibility have been enabled]
169+
(https://github.com/rust-lang/rust/pull/33982)
170+
This was an [ammendment to RFC 550]
171+
(https://github.com/rust-lang/rfcs/pull/1384),
172+
and has been a warning since 1.10.
173+
* [`cfg` attribute process has been refactored to fix various bugs]
174+
(https://github.com/rust-lang/rust/pull/33706).
175+
This causes breakage in some corner cases.
176+
177+
1178
Version 1.10.0 (2016-07-07)
2179
===========================
3180

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CFG_RELEASE_NUM=1.12.0
1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release
2020
# versions (section 9)
21-
CFG_PRERELEASE_VERSION=.1
21+
CFG_PRERELEASE_VERSION=.2
2222

2323
ifeq ($(CFG_RELEASE_CHANNEL),stable)
2424
# This is the normal semver version string, e.g. "0.12.0", "0.12.0-nightly"

src/libcollections/binary_heap.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -223,27 +223,27 @@ pub struct BinaryHeap<T> {
223223
/// on `BinaryHeap`. See its documentation for details.
224224
///
225225
/// [`peek_mut()`]: struct.BinaryHeap.html#method.peek_mut
226-
#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
226+
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
227227
pub struct PeekMut<'a, T: 'a + Ord> {
228228
heap: &'a mut BinaryHeap<T>
229229
}
230230

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

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

246-
#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
246+
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
247247
impl<'a, T: Ord> DerefMut for PeekMut<'a, T> {
248248
fn deref_mut(&mut self) -> &mut T {
249249
&mut self.heap.data[0]
@@ -366,7 +366,6 @@ impl<T: Ord> BinaryHeap<T> {
366366
/// Basic usage:
367367
///
368368
/// ```
369-
/// #![feature(binary_heap_peek_mut)]
370369
/// use std::collections::BinaryHeap;
371370
/// let mut heap = BinaryHeap::new();
372371
/// assert!(heap.peek_mut().is_none());
@@ -380,7 +379,7 @@ impl<T: Ord> BinaryHeap<T> {
380379
/// }
381380
/// assert_eq!(heap.peek(), Some(&2));
382381
/// ```
383-
#[unstable(feature = "binary_heap_peek_mut", issue = "34392")]
382+
#[stable(feature = "binary_heap_peek_mut", since = "1.12.0")]
384383
pub fn peek_mut(&mut self) -> Option<PeekMut<T>> {
385384
if self.is_empty() {
386385
None

src/libcollections/btree/map.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -1981,8 +1981,6 @@ impl<'a, K: Ord, V> VacantEntry<'a, K, V> {
19811981
/// # Examples
19821982
///
19831983
/// ```
1984-
/// #![feature(map_entry_recover_keys)]
1985-
///
19861984
/// use std::collections::BTreeMap;
19871985
/// use std::collections::btree_map::Entry;
19881986
///
@@ -1992,7 +1990,7 @@ impl<'a, K: Ord, V> VacantEntry<'a, K, V> {
19921990
/// v.into_key();
19931991
/// }
19941992
/// ```
1995-
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
1993+
#[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
19961994
pub fn into_key(self) -> K {
19971995
self.key
19981996
}
@@ -2074,13 +2072,18 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
20742072
self.handle.reborrow().into_kv().0
20752073
}
20762074

2075+
/// Deprecated, renamed to `remove_entry`
2076+
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
2077+
#[rustc_deprecated(since = "1.12.0", reason = "renamed to `remove_entry`")]
2078+
pub fn remove_pair(self) -> (K, V) {
2079+
self.remove_entry()
2080+
}
2081+
20772082
/// Take ownership of the key and value from the map.
20782083
///
20792084
/// # Examples
20802085
///
20812086
/// ```
2082-
/// #![feature(map_entry_recover_keys)]
2083-
///
20842087
/// use std::collections::BTreeMap;
20852088
/// use std::collections::btree_map::Entry;
20862089
///
@@ -2089,14 +2092,14 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
20892092
///
20902093
/// if let Entry::Occupied(o) = map.entry("poneyland") {
20912094
/// // We delete the entry from the map.
2092-
/// o.remove_pair();
2095+
/// o.remove_entry();
20932096
/// }
20942097
///
20952098
/// // If now try to get the value, it will panic:
20962099
/// // println!("{}", map["poneyland"]);
20972100
/// ```
2098-
#[unstable(feature = "map_entry_recover_keys", issue = "34285")]
2099-
pub fn remove_pair(self) -> (K, V) {
2101+
#[stable(feature = "map_entry_recover_keys2", since = "1.12.0")]
2102+
pub fn remove_entry(self) -> (K, V) {
21002103
self.remove_kv()
21012104
}
21022105

src/libcollections/linked_list.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,6 @@ impl<T> LinkedList<T> {
379379
/// # Examples
380380
///
381381
/// ```
382-
/// #![feature(linked_list_contains)]
383-
///
384382
/// use std::collections::LinkedList;
385383
///
386384
/// let mut list: LinkedList<u32> = LinkedList::new();
@@ -392,8 +390,7 @@ impl<T> LinkedList<T> {
392390
/// assert_eq!(list.contains(&0), true);
393391
/// assert_eq!(list.contains(&10), false);
394392
/// ```
395-
#[unstable(feature = "linked_list_contains", reason = "recently added",
396-
issue = "32630")]
393+
#[stable(feature = "linked_list_contains", since = "1.12.0")]
397394
pub fn contains(&self, x: &T) -> bool
398395
where T: PartialEq<T>
399396
{

src/libcollections/vec.rs

+9-6
Original file line numberDiff line numberDiff line change
@@ -1453,10 +1453,11 @@ impl<T> IntoIterator for Vec<T> {
14531453
} else {
14541454
begin.offset(self.len() as isize) as *const T
14551455
};
1456-
let buf = ptr::read(&self.buf);
1456+
let cap = self.buf.cap();
14571457
mem::forget(self);
14581458
IntoIter {
1459-
_buf: buf,
1459+
buf: Shared::new(begin),
1460+
cap: cap,
14601461
ptr: begin,
14611462
end: end,
14621463
}
@@ -1708,8 +1709,9 @@ impl<'a, T> FromIterator<T> for Cow<'a, [T]> where T: Clone {
17081709
/// [`IntoIterator`]: ../../std/iter/trait.IntoIterator.html
17091710
#[stable(feature = "rust1", since = "1.0.0")]
17101711
pub struct IntoIter<T> {
1711-
_buf: RawVec<T>,
1712-
ptr: *mut T,
1712+
buf: Shared<T>,
1713+
cap: usize,
1714+
ptr: *const T,
17131715
end: *const T,
17141716
}
17151717

@@ -1750,7 +1752,7 @@ impl<T> IntoIter<T> {
17501752
#[unstable(feature = "vec_into_iter_as_slice", issue = "35601")]
17511753
pub fn as_mut_slice(&self) -> &mut [T] {
17521754
unsafe {
1753-
slice::from_raw_parts_mut(self.ptr, self.len())
1755+
slice::from_raw_parts_mut(self.ptr as *mut T, self.len())
17541756
}
17551757
}
17561758
}
@@ -1846,9 +1848,10 @@ impl<T> Drop for IntoIter<T> {
18461848
#[unsafe_destructor_blind_to_params]
18471849
fn drop(&mut self) {
18481850
// destroy the remaining elements
1849-
for _x in self {}
1851+
for _x in self.by_ref() {}
18501852

18511853
// RawVec handles deallocation
1854+
let _ = unsafe { RawVec::from_raw_parts(*self.buf, self.cap) };
18521855
}
18531856
}
18541857

src/libcollections/vec_deque.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,6 @@ impl<T> VecDeque<T> {
938938
/// # Examples
939939
///
940940
/// ```
941-
/// #![feature(vec_deque_contains)]
942-
///
943941
/// use std::collections::VecDeque;
944942
///
945943
/// let mut vector: VecDeque<u32> = VecDeque::new();
@@ -950,8 +948,7 @@ impl<T> VecDeque<T> {
950948
/// assert_eq!(vector.contains(&1), true);
951949
/// assert_eq!(vector.contains(&10), false);
952950
/// ```
953-
#[unstable(feature = "vec_deque_contains", reason = "recently added",
954-
issue = "32630")]
951+
#[stable(feature = "vec_deque_contains", since = "1.12.0")]
955952
pub fn contains(&self, x: &T) -> bool
956953
where T: PartialEq<T>
957954
{

0 commit comments

Comments
 (0)