about summary refs log tree commit diff
path: root/src/libcore/task
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-01-25 16:57:39 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-01-29 10:42:45 -0800
commiteb4d39e1fef918242a5dba2a09d7b9faa437b911 (patch)
tree92d923119a6d8f1b16d83c2214e8acf9d0dd25e6 /src/libcore/task
parentf1e78c6dd7dc41a9937c466a7af5d0efc779909f (diff)
downloadrust-eb4d39e1fef918242a5dba2a09d7b9faa437b911.tar.gz
rust-eb4d39e1fef918242a5dba2a09d7b9faa437b911.zip
libstd: Remove "dual impls" from the language and enforce coherence rules. r=brson
"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.
Diffstat (limited to 'src/libcore/task')
-rw-r--r--src/libcore/task/mod.rs2
-rw-r--r--src/libcore/task/spawn.rs4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/task/mod.rs b/src/libcore/task/mod.rs
index aa82309c78a..9ddafee6938 100644
--- a/src/libcore/task/mod.rs
+++ b/src/libcore/task/mod.rs
@@ -45,7 +45,7 @@ use iter;
 use libc;
 use option;
 use result::Result;
-use pipes::{stream, Chan, Port, SharedChan};
+use pipes::{stream, Chan, GenericChan, GenericPort, Port, SharedChan};
 use pipes;
 use prelude::*;
 use ptr;
diff --git a/src/libcore/task/spawn.rs b/src/libcore/task/spawn.rs
index a5ab4af40be..0a2f6634214 100644
--- a/src/libcore/task/spawn.rs
+++ b/src/libcore/task/spawn.rs
@@ -74,8 +74,10 @@
 #[warn(deprecated_mode)];
 
 use cast;
+use container::Map;
+use oldcomm;
 use option;
-use pipes::{stream, Chan, Port};
+use pipes::{Chan, GenericChan, GenericPort, Port};
 use pipes;
 use prelude::*;
 use private;