diff options
| author | bors <bors@rust-lang.org> | 2015-02-19 18:36:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-19 18:36:59 +0000 |
| commit | 522d09dfecbeca1595f25ac58c6d0178bbd21d7d (patch) | |
| tree | cc0252dd3413e5f890d0ebcfdaa096e5b002be0b /src/libstd/old_io/mod.rs | |
| parent | 0b664bb8436f2cfda7f13a6f302ab486f332816f (diff) | |
| parent | 49771bafa5fca16486bfd06741dac3de2c587adf (diff) | |
| download | rust-1.0.0-alpha.2.tar.gz rust-1.0.0-alpha.2.zip | |
Auto merge of #22541 - Manishearth:rollup, r=Gankro 1.0.0-alpha.2
Continued from #22520
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 |
