Rollup merge of #22898 - edwardw:one-less-unsafe-impl, r=huonw

These implementations were temporary workaround. Now #22828 has been
fixed, they can be removed.
This commit is contained in:
Manish Goregaokar 2015-03-01 01:18:59 +05:30
commit 3c1f61ce63

View File

@ -68,7 +68,7 @@ use num::{ToPrimitive, Int};
use ops::{Add, Deref, FnMut};
use option::Option;
use option::Option::{Some, None};
use marker::{Send, Sized, Sync};
use marker::Sized;
use usize;
/// An interface for dealing with "external iterators". These types of iterators
@ -1783,10 +1783,6 @@ pub struct Peekable<I: Iterator> {
peeked: Option<I::Item>,
}
// FIXME: after #22828 being fixed, the following unsafe impl should be removed
unsafe impl<I: Iterator> Sync for Peekable<I> where I: Sync, I::Item: Sync {}
unsafe impl<I: Iterator> Send for Peekable<I> where I: Send, I::Item: Send {}
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
fn clone(&self) -> Peekable<I> {
Peekable {