diff options
Diffstat (limited to 'src/libstd/old_io/mod.rs')
| -rw-r--r-- | src/libstd/old_io/mod.rs | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/src/libstd/old_io/mod.rs b/src/libstd/old_io/mod.rs index 21282a0c28a..fc3deb67f41 100644 --- a/src/libstd/old_io/mod.rs +++ b/src/libstd/old_io/mod.rs @@ -252,7 +252,7 @@ use error::Error; use fmt; use isize; use iter::{Iterator, IteratorExt}; -use marker::Sized; +use marker::{PhantomFn, Sized}; use mem::transmute; use ops::FnOnce; use option::Option; @@ -433,7 +433,7 @@ pub enum IoErrorKind { } /// A trait that lets you add a `detail` to an IoError easily -trait UpdateIoError<T> { +trait UpdateIoError { /// Returns an IoError with updated description and detail fn update_err<D>(self, desc: &'static str, detail: D) -> Self where D: FnOnce(&IoError) -> String; @@ -446,7 +446,7 @@ trait UpdateIoError<T> { fn update_desc(self, desc: &'static str) -> Self; } -impl<T> UpdateIoError<T> for IoResult<T> { +impl<T> UpdateIoError for IoResult<T> { fn update_err<D>(self, desc: &'static str, detail: D) -> IoResult<T> where D: FnOnce(&IoError) -> String, { @@ -1572,7 +1572,9 @@ pub trait Seek { /// connections. /// /// Doing so produces some sort of Acceptor. -pub trait Listener<T, A: Acceptor<T>> { +pub trait Listener<T, A: Acceptor<T>> + : PhantomFn<T,T> // FIXME should be an assoc type anyhow +{ /// Spin up the listener and start queuing incoming connections /// /// # Error | 
