Skip to content

Commit 82a8a5e

Browse files
committed
core: Document should_not_exist's existence
Explain why it should not exist, and the plan of attack for removing it.
1 parent 57f3b6e commit 82a8a5e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/libcore/should_not_exist.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// As noted by this file name, this file should not exist. This file should not
12+
// exist because it performs allocations which libcore is not allowed to do. The
13+
// reason for this file's existence is that the `~[T]` and `~str` types are
14+
// language-defined types. Traits are defined in libcore, such as `Clone`, which
15+
// these types need to implement, but the implementation can only be found in
16+
// libcore.
17+
//
18+
// Plan of attack for solving this problem:
19+
//
20+
// 1. Implement DST
21+
// 2. Make `Box<T>` not a language feature
22+
// 3. Move `Box<T>` to a separate crate, liballoc.
23+
// 4. Implement relevant trais in liballoc, not libcore
24+
//
25+
// Currently, no progress has been made on this list.
26+
1127
use char::Char;
1228
use clone::Clone;
1329
use container::Container;

0 commit comments

Comments
 (0)