Skip to content

Commit e921e3f

Browse files
committed
Rollup test fixes and rebase conflicts
1 parent 1f2ead1 commit e921e3f

31 files changed

+56
-95
lines changed

src/doc/reference.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,6 @@ then the expression completes.
31773177
Some examples of call expressions:
31783178

31793179
```
3180-
# use std::str::from_str;
31813180
# fn add(x: int, y: int) -> int { 0 }
31823181
31833182
let x: int = add(1, 2);

src/liballoc/boxed.rs

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -113,39 +113,20 @@ impl<S: hash::Writer, Sized? T: Hash<S>> Hash<S> for Box<T> {
113113
}
114114
}
115115

116-
#[cfg(not(stage0))]
117-
impl Box<Any> {
118-
pub fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
119-
if self.is::<T>() {
120-
unsafe {
121-
// Get the raw representation of the trait object
122-
let to: TraitObject =
123-
mem::transmute::<Box<Any>, TraitObject>(self);
124-
125-
// Extract the data pointer
126-
Ok(mem::transmute(to.data))
127-
}
128-
} else {
129-
Err(self)
130-
}
131-
}
132-
}
133-
134116
/// Extension methods for an owning `Any` trait object.
135117
#[unstable = "post-DST and coherence changes, this will not be a trait but \
136118
rather a direct `impl` on `Box<Any>`"]
137-
#[cfg(stage0)]
138119
pub trait BoxAny {
139120
/// Returns the boxed value if it is of type `T`, or
140121
/// `Err(Self)` if it isn't.
141122
#[stable]
142123
fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
143124
}
144125

145-
#[stable]
146-
#[cfg(stage0)]
147126
impl BoxAny for Box<Any> {
148127
#[inline]
128+
#[unstable = "method may be renamed with respect to other downcasting \
129+
methods"]
149130
fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>> {
150131
if self.is::<T>() {
151132
unsafe {

src/libcollections/bit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use core::iter::{Chain, Enumerate, Repeat, Skip, Take, repeat, Cloned};
9292
use core::iter::{mod, FromIterator};
9393
use core::num::Int;
9494
use core::ops::Index;
95-
use core::slice::{Iter, IterMut};
95+
use core::slice;
9696
use core::{u8, u32, uint};
9797
use bitv_set; //so meta
9898

src/libcore/option.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,8 +723,6 @@ impl<T: Default> Option<T> {
723723
/// `None` on error.
724724
///
725725
/// ```
726-
/// use std::str::from_str;
727-
///
728726
/// let good_year_from_input = "1909";
729727
/// let bad_year_from_input = "190blarg";
730728
/// let good_year = good_year_from_input.parse().unwrap_or_default();

src/libcore/result.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ impl<T, E> Result<T, E> {
449449
///
450450
/// ```
451451
/// use std::io::IoResult;
452-
/// use std::str::from_str;
453452
///
454453
/// let mut buffer = &mut b"1\n2\n3\n4\n";
455454
///

src/librustc_trans/back/write.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use syntax::diagnostic;
2323
use syntax::diagnostic::{Emitter, Handler, Level, mk_handler};
2424

2525
use std::c_str::{ToCStr, CString};
26-
use std::comm::channel;
2726
use std::io::Command;
2827
use std::io::fs;
2928
use std::iter::Unfold;

src/libserialize/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ fn escape_str(wr: &mut fmt::Writer, v: &str) -> fmt::Result {
402402
}
403403

404404
fn escape_char(writer: &mut fmt::Writer, v: char) -> fmt::Result {
405-
let mut buf = [0, .. 4];
405+
let mut buf = [0; 4];
406406
let n = v.encode_utf8(&mut buf).unwrap();
407407
let buf = unsafe { str::from_utf8_unchecked(buf[0..n]) };
408408
escape_str(writer, buf)

src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ impl fmt::Show for FilePermission {
19181918
#[cfg(test)]
19191919
mod tests {
19201920
use self::BadReaderBehavior::*;
1921-
use super::{IoResult, Reader, MemReader, NoProgress, InvalidInput};
1921+
use super::{IoResult, MemReader, NoProgress, InvalidInput};
19221922
use prelude::v1::*;
19231923
use uint;
19241924

src/libstd/io/timer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ fn in_ms_u64(d: Duration) -> u64 {
225225

226226
#[cfg(test)]
227227
mod test {
228-
use prelude::v1::*;
229-
230228
use super::Timer;
231229
use thread::Thread;
232230
use time::Duration;

src/libstd/path/windows.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,10 +1119,6 @@ fn prefix_len(p: Option<PathPrefix>) -> uint {
11191119

11201120
#[cfg(test)]
11211121
mod tests {
1122-
use prelude::v1::Option::{mod, Some, None};
1123-
use prelude::v1::{Vec, Clone, AsSlice, SliceExt, CloneSliceExt, IteratorExt};
1124-
use prelude::v1::{DoubleEndedIteratorExt, Str, ToString, GenericPath};
1125-
11261122
use super::PathPrefix::*;
11271123
use super::parse_prefix;
11281124
use super::*;

0 commit comments

Comments
 (0)