Skip to content

Commit 6ce7446

Browse files
committed
librustc: Disallow trait bounds in types, enumerations, and structure definitions. r=tjc
1 parent eb4d39e commit 6ce7446

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+424
-107
lines changed

src/libcore/hashmap.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ pub mod linear {
3535

3636
const INITIAL_CAPACITY: uint = 32u; // 2^5
3737

38-
struct Bucket<K: Eq Hash, V> {
38+
struct Bucket<K,V> {
3939
hash: uint,
4040
key: K,
4141
value: V,
4242
}
4343

44-
pub struct LinearMap<K: Eq Hash, V> {
44+
pub struct LinearMap<K,V> {
4545
k0: u64,
4646
k1: u64,
4747
resize_at: uint,
@@ -408,7 +408,7 @@ pub mod linear {
408408
pure fn ne(&self, other: &LinearMap<K, V>) -> bool { !self.eq(other) }
409409
}
410410

411-
pub struct LinearSet<T: Hash IterBytes Eq> {
411+
pub struct LinearSet<T> {
412412
priv map: LinearMap<T, ()>
413413
}
414414

src/libcore/io.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ pub mod fsync {
11111111

11121112

11131113
// Artifacts that need to fsync on destruction
1114-
pub struct Res<t: Copy> {
1114+
pub struct Res<t> {
11151115
arg: Arg<t>,
11161116
}
11171117

src/libcore/oldcomm.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use vec;
6868
* transmitted. If a port value is copied, both copies refer to the same
6969
* port. Ports may be associated with multiple `chan`s.
7070
*/
71-
pub enum Port<T: Owned> {
71+
pub enum Port<T> {
7272
Port_(@PortPtr<T>)
7373
}
7474

@@ -84,7 +84,7 @@ pub enum Port<T: Owned> {
8484
* data will be silently dropped. Channels may be duplicated and
8585
* themselves transmitted over other channels.
8686
*/
87-
pub enum Chan<T: Owned> {
87+
pub enum Chan<T> {
8888
Chan_(port_id)
8989
}
9090

@@ -120,7 +120,7 @@ pub fn listen<T: Owned, U>(f: fn(Chan<T>) -> U) -> U {
120120
f(po.chan())
121121
}
122122

123-
struct PortPtr<T:Owned> {
123+
struct PortPtr<T> {
124124
po: *rust_port,
125125
drop {
126126
unsafe {
@@ -238,7 +238,7 @@ fn peek_chan<T: Owned>(ch: Chan<T>) -> bool {
238238
}
239239

240240
/// Receive on a raw port pointer
241-
fn recv_<T: Owned>(p: *rust_port) -> T {
241+
fn recv_<T>(p: *rust_port) -> T {
242242
unsafe {
243243
let yield = 0;
244244
let yieldp = ptr::addr_of(&yield);

0 commit comments

Comments
 (0)