about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-09-25 19:02:44 +0000
committerbors <bors@rust-lang.org>2014-09-25 19:02:44 +0000
commit2550243b4183783e463fbb0bc141ab77f2898e64 (patch)
treea34d71e3e339cec76c0972b39da8ee2430d7bda0 /src/libcore
parent3be6a2fba8bc3382df4b5a4f9391d9b2f28de9d1 (diff)
parent6473909a1b1ff5c435d75d4df844c4b08dafcee9 (diff)
downloadrust-2550243b4183783e463fbb0bc141ab77f2898e64.tar.gz
rust-2550243b4183783e463fbb0bc141ab77f2898e64.zip
auto merge of #17466 : nikomatsakis/rust/oibt, r=pcwalton
Moves the vast majority of builtin bound checking out of type contents and into the trait system.

This is a preliminary step for a lot of follow-on work:

- opt-in builtin types, obviously
- generalized where clauses, because TypeContents has this notion that a type parameter has a single set of builtin kinds, but with where clauses it depends on context
- generalized coherence, because this adds support for recursive trait selection

Unfortunately I wasn't able to completely remove Type Contents from the front-end checking in this PR. It's still used by EUV to decide what gets moved and what doesn't.

r? @pcwalton 
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/kinds.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/kinds.rs b/src/libcore/kinds.rs
index 0a1334e5d13..b0206e73e47 100644
--- a/src/libcore/kinds.rs
+++ b/src/libcore/kinds.rs
@@ -25,19 +25,19 @@ pub use self::Sync as Share;
 
 /// Types able to be transferred across task boundaries.
 #[lang="send"]
-pub trait Send {
+pub trait Send for Sized? {
     // empty.
 }
 
 /// Types with a constant size known at compile-time.
 #[lang="sized"]
-pub trait Sized {
+pub trait Sized for Sized? {
     // Empty.
 }
 
 /// Types that can be copied by simply copying bits (i.e. `memcpy`).
 #[lang="copy"]
-pub trait Copy {
+pub trait Copy for Sized? {
     // Empty.
 }
 
@@ -87,7 +87,7 @@ pub trait Copy {
 /// reference; not doing this is undefined behaviour (for example,
 /// `transmute`-ing from `&T` to `&mut T` is illegal).
 #[lang="sync"]
-pub trait Sync {
+pub trait Sync for Sized? {
     // Empty
 }