]> git.lizzy.rs Git - rust.git/commitdiff
Fallout: Accepter trait needs phantomdata. This seems like it should
authorNiko Matsakis <niko@alum.mit.edu>
Thu, 12 Feb 2015 17:49:10 +0000 (12:49 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Wed, 18 Feb 2015 15:38:25 +0000 (10:38 -0500)
be migrated to an associated type anyway.

src/libstd/old_io/mod.rs

index 9655da92e56971e03d038d55e10e8194136cce65..8b9eb44066f1d211fb557fd5754337512e6b6417 100644 (file)
 use fmt;
 use isize;
 use iter::{Iterator, IteratorExt};
-use marker::Sized;
+use marker::{PhantomFn, Sized};
 use mem::transmute;
 use ops::FnOnce;
 use option::Option;
@@ -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