core: Implement necessary traits for ~[T]/~str

Coherence requires that libcore's traits be implemented in libcore for ~[T] and
~str (due to them being language defined types). These implementations cannot
live in libcore forever, but for now, until Heap/Box/Uniq is a lang item, these
implementations must reside inside of libcore. While not perfect
implementations, these shouldn't reside in libcore for too long.

With some form of lang item these implementations can be in a proper crate
because the lang item will not be present in libcore.
This commit is contained in:
Alex Crichton
2014-04-30 23:19:52 -07:00
parent c67ebf1ef3
commit e0d43b023e
2 changed files with 200 additions and 0 deletions

View File

@@ -73,3 +73,6 @@ pub mod char;
pub mod slice;
pub mod str;
pub mod tuple;
// FIXME: this module should not exist
mod should_not_exist;