Skip to content

Commit ec5a24f

Browse files
committed
---
yaml --- r: 223038 b: refs/heads/auto c: 4d218d9 h: refs/heads/master v: v3
1 parent a2beb22 commit ec5a24f

20 files changed

+54
-162
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 8d2eb5971a9e91a9c994768055cb9fa192868699
11+
refs/heads/auto: 4d218d924fb140b43e2a9e1c6cf29283c94a5f15
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/RELEASES.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ Highlights
1616
jobs). It's not enabled by default, but will be "in the near
1717
future". It can be activated with the `-C codegen-units=N` flag to
1818
`rustc`.
19+
* This is the first release with [experimental support for linking
20+
with the MSVC linker and lib C on Windows (instead of using the GNU
21+
variants via MinGW)][win]. It is yet recommended only for the most
22+
intrepid Rusticians.
23+
* Benchmark compilations are showing a 30% improvement in
24+
bootstrapping over 1.1.
1925

2026
Breaking Changes
2127
----------------
@@ -31,6 +37,10 @@ Breaking Changes
3137
* [The `#[packed]` attribute is no longer silently accepted by the
3238
compiler][packed]. This attribute did nothing and code that
3339
mentioned it likely did not work as intended.
40+
* Associated type defaults are [now behind the
41+
`associated_type_defaults` feature gate][ad]. In 1.1 associated type
42+
defaults *did not work*, but could be mentioned syntactically. As
43+
such this breakage has minimal impact.
3444

3545
Language
3646
--------
@@ -46,12 +56,11 @@ Libraries
4656
`LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
4757
`BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
4858
* The [`iter::once`] function returns an iterator that yields a single
49-
element.
50-
* The [`iter::empty`] function returns an iterator that yields no
59+
element, and [`iter::empty`] returns an iterator that yields no
5160
elements.
5261
* The [`matches`] and [`rmatches`] methods on `str` return iterators
5362
over substring matches.
54-
* [`Cell`] and [`RefCell`] both implement [`Eq`].
63+
* [`Cell`] and [`RefCell`] both implement `Eq`.
5564
* A number of methods for wrapping arithmetic are added to the
5665
integral types, [`wrapping_div`], [`wrapping_rem`],
5766
[`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
@@ -144,6 +153,8 @@ Misc
144153
[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
145154
[parcodegen]: https://github.com/rust-lang/rust/pull/26018
146155
[packed]: https://github.com/rust-lang/rust/pull/25541
156+
[ad]: https://github.com/rust-lang/rust/pull/27382
157+
[win]: https://github.com/rust-lang/rust/pull/25350
147158

148159
Version 1.1.0 (June 2015)
149160
=========================

branches/auto/src/doc/tarpl/races.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ race condition can't violate memory safety in a Rust program on
2525
its own. Only in conjunction with some other unsafe code can a race condition
2626
actually violate memory safety. For instance:
2727

28-
```rust,no_run
28+
```rust,norun
2929
use std::thread;
3030
use std::sync::atomic::{AtomicUsize, Ordering};
3131
use std::sync::Arc;
@@ -56,7 +56,7 @@ thread::spawn(move || {
5656
println!("{}", data[idx.load(Ordering::SeqCst)]);
5757
```
5858

59-
```rust,no_run
59+
```rust,norun
6060
use std::thread;
6161
use std::sync::atomic::{AtomicUsize, Ordering};
6262
use std::sync::Arc;

branches/auto/src/libcore/hash/mod.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ pub trait Hash {
9191
fn hash<H: Hasher>(&self, state: &mut H);
9292

9393
/// Feeds a slice of this type into the state provided.
94-
#[stable(feature = "hash_slice", since = "1.3.0")]
94+
#[unstable(feature = "hash_slice",
95+
reason = "module was recently redesigned")]
9596
fn hash_slice<H: Hasher>(data: &[Self], state: &mut H) where Self: Sized {
9697
for piece in data {
9798
piece.hash(state);
@@ -112,29 +113,29 @@ pub trait Hasher {
112113

113114
/// Write a single `u8` into this hasher
114115
#[inline]
115-
#[stable(feature = "hasher_write", since = "1.3.0")]
116+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
116117
fn write_u8(&mut self, i: u8) { self.write(&[i]) }
117118
/// Write a single `u16` into this hasher.
118119
#[inline]
119-
#[stable(feature = "hasher_write", since = "1.3.0")]
120+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
120121
fn write_u16(&mut self, i: u16) {
121122
self.write(&unsafe { mem::transmute::<_, [u8; 2]>(i) })
122123
}
123124
/// Write a single `u32` into this hasher.
124125
#[inline]
125-
#[stable(feature = "hasher_write", since = "1.3.0")]
126+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
126127
fn write_u32(&mut self, i: u32) {
127128
self.write(&unsafe { mem::transmute::<_, [u8; 4]>(i) })
128129
}
129130
/// Write a single `u64` into this hasher.
130131
#[inline]
131-
#[stable(feature = "hasher_write", since = "1.3.0")]
132+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
132133
fn write_u64(&mut self, i: u64) {
133134
self.write(&unsafe { mem::transmute::<_, [u8; 8]>(i) })
134135
}
135136
/// Write a single `usize` into this hasher.
136137
#[inline]
137-
#[stable(feature = "hasher_write", since = "1.3.0")]
138+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
138139
fn write_usize(&mut self, i: usize) {
139140
if cfg!(target_pointer_width = "32") {
140141
self.write_u32(i as u32)
@@ -145,23 +146,23 @@ pub trait Hasher {
145146

146147
/// Write a single `i8` into this hasher.
147148
#[inline]
148-
#[stable(feature = "hasher_write", since = "1.3.0")]
149+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
149150
fn write_i8(&mut self, i: i8) { self.write_u8(i as u8) }
150151
/// Write a single `i16` into this hasher.
151152
#[inline]
152-
#[stable(feature = "hasher_write", since = "1.3.0")]
153+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
153154
fn write_i16(&mut self, i: i16) { self.write_u16(i as u16) }
154155
/// Write a single `i32` into this hasher.
155156
#[inline]
156-
#[stable(feature = "hasher_write", since = "1.3.0")]
157+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
157158
fn write_i32(&mut self, i: i32) { self.write_u32(i as u32) }
158159
/// Write a single `i64` into this hasher.
159160
#[inline]
160-
#[stable(feature = "hasher_write", since = "1.3.0")]
161+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
161162
fn write_i64(&mut self, i: i64) { self.write_u64(i as u64) }
162163
/// Write a single `isize` into this hasher.
163164
#[inline]
164-
#[stable(feature = "hasher_write", since = "1.3.0")]
165+
#[unstable(feature = "hasher_write", reason = "module was recently redesigned")]
165166
fn write_isize(&mut self, i: isize) { self.write_usize(i as usize) }
166167
}
167168

branches/auto/src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
#![allow(raw_pointer_derive)]
6666
#![deny(missing_docs)]
6767

68-
#![feature(associated_type_defaults)]
6968
#![feature(intrinsics)]
7069
#![feature(lang_items)]
7170
#![feature(on_unimplemented)]

branches/auto/src/librustdoc/markdown.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ use test::{TestOptions, Collector};
2929
/// Separate any lines at the start of the file that begin with `%`.
3030
fn extract_leading_metadata<'a>(s: &'a str) -> (Vec<&'a str>, &'a str) {
3131
let mut metadata = Vec::new();
32-
let mut count = 0;
3332
for line in s.lines() {
3433
if line.starts_with("%") {
3534
// remove %<whitespace>
36-
metadata.push(line[1..].trim_left());
37-
count += line.len() + 1;
35+
metadata.push(line[1..].trim_left())
3836
} else {
39-
return (metadata, &s[count..]);
37+
let line_start_byte = s.find(line).unwrap();
38+
return (metadata, &s[line_start_byte..]);
4039
}
4140
}
4241
// if we're here, then all lines were metadata % lines.

branches/auto/src/libstd/error.rs

Lines changed: 9 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl Error for string::FromUtf16Error {
168168
// copied from any.rs
169169
impl Error + 'static {
170170
/// Returns true if the boxed type is the same as `T`
171-
#[stable(feature = "error_downcast", since = "1.3.0")]
171+
#[unstable(feature = "error_downcast", reason = "recently added")]
172172
#[inline]
173173
pub fn is<T: Error + 'static>(&self) -> bool {
174174
// Get TypeId of the type this function is instantiated with
@@ -183,7 +183,7 @@ impl Error + 'static {
183183

184184
/// Returns some reference to the boxed value if it is of type `T`, or
185185
/// `None` if it isn't.
186-
#[stable(feature = "error_downcast", since = "1.3.0")]
186+
#[unstable(feature = "error_downcast", reason = "recently added")]
187187
#[inline]
188188
pub fn downcast_ref<T: Error + 'static>(&self) -> Option<&T> {
189189
if self.is::<T>() {
@@ -201,7 +201,7 @@ impl Error + 'static {
201201

202202
/// Returns some mutable reference to the boxed value if it is of type `T`, or
203203
/// `None` if it isn't.
204-
#[stable(feature = "error_downcast", since = "1.3.0")]
204+
#[unstable(feature = "error_downcast", reason = "recently added")]
205205
#[inline]
206206
pub fn downcast_mut<T: Error + 'static>(&mut self) -> Option<&mut T> {
207207
if self.is::<T>() {
@@ -220,44 +220,21 @@ impl Error + 'static {
220220

221221
impl Error + 'static + Send {
222222
/// Forwards to the method defined on the type `Any`.
223-
#[stable(feature = "error_downcast", since = "1.3.0")]
223+
#[unstable(feature = "error_downcast", reason = "recently added")]
224224
#[inline]
225225
pub fn is<T: Error + 'static>(&self) -> bool {
226226
<Error + 'static>::is::<T>(self)
227227
}
228228

229229
/// Forwards to the method defined on the type `Any`.
230-
#[stable(feature = "error_downcast", since = "1.3.0")]
230+
#[unstable(feature = "error_downcast", reason = "recently added")]
231231
#[inline]
232232
pub fn downcast_ref<T: Error + 'static>(&self) -> Option<&T> {
233233
<Error + 'static>::downcast_ref::<T>(self)
234234
}
235235

236236
/// Forwards to the method defined on the type `Any`.
237-
#[stable(feature = "error_downcast", since = "1.3.0")]
238-
#[inline]
239-
pub fn downcast_mut<T: Error + 'static>(&mut self) -> Option<&mut T> {
240-
<Error + 'static>::downcast_mut::<T>(self)
241-
}
242-
}
243-
244-
impl Error + 'static + Send + Sync {
245-
/// Forwards to the method defined on the type `Any`.
246-
#[stable(feature = "error_downcast", since = "1.3.0")]
247-
#[inline]
248-
pub fn is<T: Error + 'static>(&self) -> bool {
249-
<Error + 'static>::is::<T>(self)
250-
}
251-
252-
/// Forwards to the method defined on the type `Any`.
253-
#[stable(feature = "error_downcast", since = "1.3.0")]
254-
#[inline]
255-
pub fn downcast_ref<T: Error + 'static>(&self) -> Option<&T> {
256-
<Error + 'static>::downcast_ref::<T>(self)
257-
}
258-
259-
/// Forwards to the method defined on the type `Any`.
260-
#[stable(feature = "error_downcast", since = "1.3.0")]
237+
#[unstable(feature = "error_downcast", reason = "recently added")]
261238
#[inline]
262239
pub fn downcast_mut<T: Error + 'static>(&mut self) -> Option<&mut T> {
263240
<Error + 'static>::downcast_mut::<T>(self)
@@ -266,7 +243,7 @@ impl Error + 'static + Send + Sync {
266243

267244
impl Error {
268245
#[inline]
269-
#[stable(feature = "error_downcast", since = "1.3.0")]
246+
#[unstable(feature = "error_downcast", reason = "recently added")]
270247
/// Attempt to downcast the box to a concrete type.
271248
pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Error>> {
272249
if self.is::<T>() {
@@ -287,74 +264,13 @@ impl Error {
287264

288265
impl Error + Send {
289266
#[inline]
290-
#[stable(feature = "error_downcast", since = "1.3.0")]
267+
#[unstable(feature = "error_downcast", reason = "recently added")]
291268
/// Attempt to downcast the box to a concrete type.
292-
pub fn downcast<T: Error + 'static>(self: Box<Self>)
293-
-> Result<Box<T>, Box<Error + Send>> {
269+
pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<Error + Send>> {
294270
let err: Box<Error> = self;
295271
<Error>::downcast(err).map_err(|s| unsafe {
296272
// reapply the Send marker
297273
transmute::<Box<Error>, Box<Error + Send>>(s)
298274
})
299275
}
300276
}
301-
302-
impl Error + Send + Sync {
303-
#[inline]
304-
#[stable(feature = "error_downcast", since = "1.3.0")]
305-
/// Attempt to downcast the box to a concrete type.
306-
pub fn downcast<T: Error + 'static>(self: Box<Self>)
307-
-> Result<Box<T>, Box<Self>> {
308-
let err: Box<Error> = self;
309-
<Error>::downcast(err).map_err(|s| unsafe {
310-
// reapply the Send+Sync marker
311-
transmute::<Box<Error>, Box<Error + Send + Sync>>(s)
312-
})
313-
}
314-
}
315-
316-
#[cfg(test)]
317-
mod tests {
318-
use prelude::v1::*;
319-
use super::Error;
320-
use fmt;
321-
322-
#[derive(Debug, PartialEq)]
323-
struct A;
324-
#[derive(Debug, PartialEq)]
325-
struct B;
326-
327-
impl fmt::Display for A {
328-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
329-
write!(f, "A")
330-
}
331-
}
332-
impl fmt::Display for B {
333-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
334-
write!(f, "B")
335-
}
336-
}
337-
338-
impl Error for A {
339-
fn description(&self) -> &str { "A-desc" }
340-
}
341-
impl Error for B {
342-
fn description(&self) -> &str { "A-desc" }
343-
}
344-
345-
#[test]
346-
fn downcasting() {
347-
let mut a = A;
348-
let mut a = &mut a as &mut (Error + 'static);
349-
assert_eq!(a.downcast_ref::<A>(), Some(&A));
350-
assert_eq!(a.downcast_ref::<B>(), None);
351-
assert_eq!(a.downcast_mut::<A>(), Some(&mut A));
352-
assert_eq!(a.downcast_mut::<B>(), None);
353-
354-
let a: Box<Error> = Box::new(A);
355-
match a.downcast::<B>() {
356-
Ok(..) => panic!("expected error"),
357-
Err(e) => assert_eq!(*e.downcast::<A>().unwrap(), A),
358-
}
359-
}
360-
}

branches/auto/src/libstd/io/error.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ impl Error {
219219
///
220220
/// If this `Error` was constructed via `new` then this function will
221221
/// return `Some`, otherwise it will return `None`.
222-
#[stable(feature = "io_error_inner", since = "1.3.0")]
222+
#[unstable(feature = "io_error_inner",
223+
reason = "recently added and requires UFCS to downcast")]
223224
pub fn get_ref(&self) -> Option<&(error::Error+Send+Sync+'static)> {
224225
match self.repr {
225226
Repr::Os(..) => None,
@@ -232,7 +233,8 @@ impl Error {
232233
///
233234
/// If this `Error` was constructed via `new` then this function will
234235
/// return `Some`, otherwise it will return `None`.
235-
#[stable(feature = "io_error_inner", since = "1.3.0")]
236+
#[unstable(feature = "io_error_inner",
237+
reason = "recently added and requires UFCS to downcast")]
236238
pub fn get_mut(&mut self) -> Option<&mut (error::Error+Send+Sync+'static)> {
237239
match self.repr {
238240
Repr::Os(..) => None,
@@ -244,7 +246,8 @@ impl Error {
244246
///
245247
/// If this `Error` was constructed via `new` then this function will
246248
/// return `Some`, otherwise it will return `None`.
247-
#[stable(feature = "io_error_inner", since = "1.3.0")]
249+
#[unstable(feature = "io_error_inner",
250+
reason = "recently added and requires UFCS to downcast")]
248251
pub fn into_inner(self) -> Option<Box<error::Error+Send+Sync>> {
249252
match self.repr {
250253
Repr::Os(..) => None,
@@ -346,10 +349,10 @@ mod test {
346349
// we have to call all of these UFCS style right now since method
347350
// resolution won't implicitly drop the Send+Sync bounds
348351
let mut err = Error::new(ErrorKind::Other, TestError);
349-
assert!(err.get_ref().unwrap().is::<TestError>());
352+
assert!(error::Error::is::<TestError>(err.get_ref().unwrap()));
350353
assert_eq!("asdf", err.get_ref().unwrap().description());
351-
assert!(err.get_mut().unwrap().is::<TestError>());
354+
assert!(error::Error::is::<TestError>(err.get_mut().unwrap()));
352355
let extracted = err.into_inner().unwrap();
353-
extracted.downcast::<TestError>().unwrap();
356+
error::Error::downcast::<TestError>(extracted).unwrap();
354357
}
355358
}

branches/auto/src/libstd/io/stdio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ impl Stdin {
255255
// in which case it will wait for the Enter key to be pressed before
256256
/// continuing
257257
#[stable(feature = "rust1", since = "1.0.0")]
258-
pub fn read_line(&self, buf: &mut String) -> io::Result<usize> {
258+
pub fn read_line(&mut self, buf: &mut String) -> io::Result<usize> {
259259
self.lock().read_line(buf)
260260
}
261261
}

branches/auto/src/libstd/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ impl Child {
505505
}
506506

507507
/// Returns the OS-assigned process identifier associated with this child.
508-
#[stable(feature = "process_id", since = "1.3.0")]
508+
#[unstable(feature = "process_id", reason = "api recently added")]
509509
pub fn id(&self) -> u32 {
510510
self.handle.id()
511511
}

0 commit comments

Comments
 (0)