Skip to content

Commit 8331909

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163659 b: refs/heads/snap-stage3 c: c32a482 h: refs/heads/master i: 163657: 224a372 163655: b9a9240 v: v3
1 parent 4159321 commit 8331909

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: bd90b936d73c0ea2c261cd8e7b9c43764cb2da05
4+
refs/heads/snap-stage3: c32a48293aab01133ed9e131fe452fd8c88ff9de
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/libcollections/binary_heap.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@
2929
//! use std::collections::BinaryHeap;
3030
//! use std::uint;
3131
//!
32-
//! #[deriving(Eq, PartialEq)]
32+
//! #[deriving(Copy, Eq, PartialEq)]
3333
//! struct State {
3434
//! cost: uint,
3535
//! position: uint
3636
//! }
3737
//!
38-
//! impl Copy for State {}
39-
//!
4038
//! // The priority queue depends on `Ord`.
4139
//! // Explicitly implement the trait so the queue becomes a min-heap
4240
//! // instead of a max-heap.

branches/snap-stage3/src/libcollections/enum_set.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,12 @@ mod test {
301301

302302
use super::{EnumSet, CLike};
303303

304-
#[deriving(PartialEq, Show)]
304+
#[deriving(Copy, PartialEq, Show)]
305305
#[repr(uint)]
306306
enum Foo {
307307
A, B, C
308308
}
309309

310-
impl Copy for Foo {}
311-
312310
impl CLike for Foo {
313311
fn to_uint(&self) -> uint {
314312
*self as uint
@@ -507,6 +505,7 @@ mod test {
507505
#[should_fail]
508506
fn test_overflow() {
509507
#[allow(dead_code)]
508+
#[deriving(Copy)]
510509
#[repr(uint)]
511510
enum Bar {
512511
V00, V01, V02, V03, V04, V05, V06, V07, V08, V09,
@@ -518,8 +517,6 @@ mod test {
518517
V60, V61, V62, V63, V64, V65, V66, V67, V68, V69,
519518
}
520519

521-
impl Copy for Bar {}
522-
523520
impl CLike for Bar {
524521
fn to_uint(&self) -> uint {
525522
*self as uint

branches/snap-stage3/src/libcollections/slice.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ use alloc::boxed::Box;
9191
use core::borrow::{BorrowFrom, BorrowFromMut, ToOwned};
9292
use core::cmp;
9393
use core::iter::{range_step, MultiplicativeIterator};
94-
use core::kinds::{Copy, Sized};
94+
use core::kinds::Sized;
9595
use core::mem::size_of;
9696
use core::mem;
9797
use core::ops::FnMut;
@@ -177,18 +177,16 @@ impl ElementSwaps {
177177
}
178178
}
179179

180+
#[deriving(Copy)]
180181
enum Direction { Pos, Neg }
181182

182-
impl Copy for Direction {}
183-
184183
/// An `Index` and `Direction` together.
184+
#[deriving(Copy)]
185185
struct SizeDirection {
186186
size: uint,
187187
dir: Direction,
188188
}
189189

190-
impl Copy for SizeDirection {}
191-
192190
impl Iterator<(uint, uint)> for ElementSwaps {
193191
#[inline]
194192
fn next(&mut self) -> Option<(uint, uint)> {

branches/snap-stage3/src/libcore/hash/sip.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use default::Default;
3030
use super::{Hash, Hasher, Writer};
3131

3232
/// `SipState` computes a SipHash 2-4 hash over a stream of bytes.
33+
#[deriving(Copy)]
3334
pub struct SipState {
3435
k0: u64,
3536
k1: u64,
@@ -42,8 +43,6 @@ pub struct SipState {
4243
ntail: uint, // how many bytes in tail are valid
4344
}
4445

45-
impl Copy for SipState {}
46-
4746
// sadly, these macro definitions can't appear later,
4847
// because they're needed in the following defs;
4948
// this design could be improved.

0 commit comments

Comments
 (0)