Skip to content

Commit f4d9b36

Browse files
committed
---
yaml --- r: 162307 b: refs/heads/auto c: 87edbea h: refs/heads/master i: 162305: a6b1cbc 162303: ff936b0 v: v3
1 parent de608ef commit f4d9b36

File tree

288 files changed

+795
-2527
lines changed

Some content is hidden

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

288 files changed

+795
-2527
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: cafe2966770ff377aad6dd9fd808e68055587c58
13+
refs/heads/auto: 87edbea9da1d7dfd7e8c68e15f846f08d5f3a8c0
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/compiletest/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ pub enum Mode {
2525
Codegen
2626
}
2727

28-
impl Copy for Mode {}
29-
3028
impl FromStr for Mode {
3129
fn from_str(s: &str) -> Option<Mode> {
3230
match s {

branches/auto/src/doc/guide-unsafe.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -661,9 +661,6 @@ extern {
661661
fn abort() -> !;
662662
}
663663
664-
#[lang = "owned_box"]
665-
pub struct Box<T>(*mut T);
666-
667664
#[lang="exchange_malloc"]
668665
unsafe fn allocate(size: uint, _align: uint) -> *mut u8 {
669666
let p = libc::malloc(size as libc::size_t) as *mut u8;

branches/auto/src/doc/reference.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,6 @@ Implementations are defined with the keyword `impl`.
16601660

16611661
```
16621662
# struct Point {x: f64, y: f64};
1663-
# impl Copy for Point {}
16641663
# type Surface = int;
16651664
# struct BoundingBox {x: f64, y: f64, width: f64, height: f64};
16661665
# trait Shape { fn draw(&self, Surface); fn bounding_box(&self) -> BoundingBox; }
@@ -1670,8 +1669,6 @@ struct Circle {
16701669
center: Point,
16711670
}
16721671
1673-
impl Copy for Circle {}
1674-
16751672
impl Shape for Circle {
16761673
fn draw(&self, s: Surface) { do_draw_circle(s, *self); }
16771674
fn bounding_box(&self) -> BoundingBox {
@@ -1794,7 +1791,6 @@ default visibility with the `priv` keyword. When an item is declared as `pub`,
17941791
it can be thought of as being accessible to the outside world. For example:
17951792

17961793
```
1797-
# #![allow(missing_copy_implementations)]
17981794
# fn main() {}
17991795
// Declare a private struct
18001796
struct Foo;

branches/auto/src/libarena/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ impl<T> TypedArena<T> {
466466
}
467467

468468
let ptr: &mut T = unsafe {
469-
let ptr: &mut T = mem::transmute(self.ptr.clone());
469+
let ptr: &mut T = mem::transmute(self.ptr);
470470
ptr::write(ptr, object);
471471
self.ptr.set(self.ptr.get().offset(1));
472472
ptr

branches/auto/src/libcollections/binary_heap.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
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/auto/src/libcollections/dlist.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,7 @@ pub struct DList<T> {
3939
}
4040

4141
type Link<T> = Option<Box<Node<T>>>;
42-
43-
struct Rawlink<T> {
44-
p: *mut T,
45-
}
46-
47-
impl<T> Copy for Rawlink<T> {}
42+
struct Rawlink<T> { p: *mut T }
4843

4944
struct Node<T> {
5045
next: Link<T>,
@@ -64,8 +59,6 @@ impl<'a, T> Clone for Items<'a, T> {
6459
fn clone(&self) -> Items<'a, T> { *self }
6560
}
6661

67-
impl<'a,T> Copy for Items<'a,T> {}
68-
6962
/// An iterator over mutable references to the items of a `DList`.
7063
pub struct MutItems<'a, T:'a> {
7164
list: &'a mut DList<T>,

branches/auto/src/libcollections/enum_set.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ pub struct EnumSet<E> {
2727
bits: uint
2828
}
2929

30-
impl<E> Copy for EnumSet<E> {}
31-
3230
impl<E:CLike+fmt::Show> fmt::Show for EnumSet<E> {
3331
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
3432
try!(write!(fmt, "{{"));
@@ -271,8 +269,6 @@ mod test {
271269
A, B, C
272270
}
273271

274-
impl Copy for Foo {}
275-
276272
impl CLike for Foo {
277273
fn to_uint(&self) -> uint {
278274
*self as uint
@@ -481,9 +477,6 @@ mod test {
481477
V50, V51, V52, V53, V54, V55, V56, V57, V58, V59,
482478
V60, V61, V62, V63, V64, V65, V66, V67, V68, V69,
483479
}
484-
485-
impl Copy for Bar {}
486-
487480
impl CLike for Bar {
488481
fn to_uint(&self) -> uint {
489482
*self as uint

branches/auto/src/libcollections/hash/sip.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ pub struct SipState {
4343
ntail: uint, // how many bytes in tail are valid
4444
}
4545

46-
impl Copy for SipState {}
47-
4846
// sadly, these macro definitions can't appear later,
4947
// because they're needed in the following defs;
5048
// this design could be improved.
@@ -213,7 +211,6 @@ impl Default for SipState {
213211

214212
/// `SipHasher` computes the SipHash algorithm from a stream of bytes.
215213
#[deriving(Clone)]
216-
#[allow(missing_copy_implementations)]
217214
pub struct SipHasher {
218215
k0: u64,
219216
k1: u64,

branches/auto/src/libcollections/slice.rs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ use self::Direction::*;
9191
use alloc::boxed::Box;
9292
use core::borrow::{BorrowFrom, BorrowFromMut, ToOwned};
9393
use core::cmp;
94-
use core::kinds::{Copy, Sized};
94+
use core::kinds::Sized;
9595
use core::mem::size_of;
9696
use core::mem;
9797
use core::prelude::{Clone, Greater, Iterator, IteratorExt, Less, None, Option};
@@ -177,16 +177,12 @@ impl ElementSwaps {
177177

178178
enum Direction { Pos, Neg }
179179

180-
impl Copy for Direction {}
181-
182180
/// An `Index` and `Direction` together.
183181
struct SizeDirection {
184182
size: uint,
185183
dir: Direction,
186184
}
187185

188-
impl Copy for SizeDirection {}
189-
190186
impl Iterator<(uint, uint)> for ElementSwaps {
191187
#[inline]
192188
fn next(&mut self) -> Option<(uint, uint)> {
@@ -1486,17 +1482,11 @@ mod tests {
14861482
fn clone(&self) -> S {
14871483
self.f.set(self.f.get() + 1);
14881484
if self.f.get() == 10 { panic!() }
1489-
S {
1490-
f: self.f.clone(),
1491-
boxes: self.boxes.clone(),
1492-
}
1485+
S { f: self.f, boxes: self.boxes.clone() }
14931486
}
14941487
}
14951488

1496-
let s = S {
1497-
f: Cell::new(0),
1498-
boxes: (box 0, Rc::new(0)),
1499-
};
1489+
let s = S { f: Cell::new(0), boxes: (box 0, Rc::new(0)) };
15001490
let _ = Vec::from_elem(100, s);
15011491
}
15021492

branches/auto/src/libcollections/str.rs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -228,32 +228,24 @@ impl<'a> Iterator<char> for Decompositions<'a> {
228228
_ => self.sorted = false
229229
}
230230

231+
let decomposer = match self.kind {
232+
Canonical => unicode::char::decompose_canonical,
233+
Compatible => unicode::char::decompose_compatible
234+
};
235+
231236
if !self.sorted {
232237
for ch in self.iter {
233238
let buffer = &mut self.buffer;
234239
let sorted = &mut self.sorted;
235-
{
236-
let callback = |d| {
237-
let class =
238-
unicode::char::canonical_combining_class(d);
239-
if class == 0 && !*sorted {
240-
canonical_sort(buffer.as_mut_slice());
241-
*sorted = true;
242-
}
243-
buffer.push((d, class));
244-
};
245-
match self.kind {
246-
Canonical => {
247-
unicode::char::decompose_canonical(ch, callback)
248-
}
249-
Compatible => {
250-
unicode::char::decompose_compatible(ch, callback)
251-
}
240+
decomposer(ch, |d| {
241+
let class = unicode::char::canonical_combining_class(d);
242+
if class == 0 && !*sorted {
243+
canonical_sort(buffer.as_mut_slice());
244+
*sorted = true;
252245
}
253-
}
254-
if *sorted {
255-
break
256-
}
246+
buffer.push((d, class));
247+
});
248+
if *sorted { break }
257249
}
258250
}
259251

branches/auto/src/libcollections/vec.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -682,12 +682,11 @@ impl<T> Vec<T> {
682682
Some(new_cap) => {
683683
let amort_cap = new_cap.next_power_of_two();
684684
// next_power_of_two will overflow to exactly 0 for really big capacities
685-
let cap = if amort_cap == 0 {
686-
new_cap
685+
if amort_cap == 0 {
686+
self.grow_capacity(new_cap);
687687
} else {
688-
amort_cap
689-
};
690-
self.grow_capacity(cap)
688+
self.grow_capacity(amort_cap);
689+
}
691690
}
692691
}
693692
}

branches/auto/src/libcore/atomic.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ pub use self::Ordering::*;
1717
use intrinsics;
1818
use std::kinds::marker;
1919
use cell::UnsafeCell;
20-
use kinds::Copy;
2120

2221
/// A boolean type which can be safely shared between threads.
2322
#[stable]
@@ -82,8 +81,6 @@ pub enum Ordering {
8281
SeqCst,
8382
}
8483

85-
impl Copy for Ordering {}
86-
8784
/// An `AtomicBool` initialized to `false`.
8885
#[unstable = "may be renamed, pending conventions for static initalizers"]
8986
pub const INIT_ATOMIC_BOOL: AtomicBool =

branches/auto/src/libcore/char.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,4 +519,3 @@ impl Iterator<char> for DefaultEscapedChars {
519519
}
520520
}
521521
}
522-

branches/auto/src/libcore/cmp.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
4343

4444
pub use self::Ordering::*;
4545

46-
use kinds::{Copy, Sized};
47-
use option::{Option, Some, None};
46+
use kinds::Sized;
47+
use option::Option;
48+
use option::Option::{Some, None};
4849

4950
/// Trait for values that can be compared for equality and inequality.
5051
///
@@ -105,8 +106,6 @@ pub enum Ordering {
105106
Greater = 1i,
106107
}
107108

108-
impl Copy for Ordering {}
109-
110109
impl Ordering {
111110
/// Reverse the `Ordering`, so that `Less` becomes `Greater` and
112111
/// vice versa.

branches/auto/src/libcore/fmt/mod.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ pub type Result = result::Result<(), Error>;
4646
#[experimental = "core and I/O reconciliation may alter this definition"]
4747
pub struct Error;
4848

49-
impl Copy for Error {}
50-
5149
/// A collection of methods that are required to format a message into a stream.
5250
///
5351
/// This trait is the type which this modules requires when formatting
@@ -137,8 +135,6 @@ impl<'a> Argument<'a> {
137135
}
138136
}
139137

140-
impl<'a> Copy for Argument<'a> {}
141-
142138
impl<'a> Arguments<'a> {
143139
/// When using the format_args!() macro, this function is used to generate the
144140
/// Arguments structure.

branches/auto/src/libcore/fmt/num.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
use fmt;
1818
use iter::DoubleEndedIteratorExt;
19-
use kinds::Copy;
2019
use num::{Int, cast};
2120
use slice::SlicePrelude;
2221

@@ -115,8 +114,6 @@ pub struct Radix {
115114
base: u8,
116115
}
117116

118-
impl Copy for Radix {}
119-
120117
impl Radix {
121118
fn new(base: u8) -> Radix {
122119
assert!(2 <= base && base <= 36, "the base must be in the range of 2..36: {}", base);
@@ -139,8 +136,6 @@ impl GenericRadix for Radix {
139136
#[unstable = "may be renamed or move to a different module"]
140137
pub struct RadixFmt<T, R>(T, R);
141138

142-
impl<T,R> Copy for RadixFmt<T,R> where T: Copy, R: Copy {}
143-
144139
/// Constructs a radix formatter in the range of `2..36`.
145140
///
146141
/// # Example

branches/auto/src/libcore/fmt/rt.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@ pub use self::Alignment::*;
2020
pub use self::Count::*;
2121
pub use self::Position::*;
2222
pub use self::Flag::*;
23-
use kinds::Copy;
2423

2524
#[doc(hidden)]
2625
pub struct Argument<'a> {
2726
pub position: Position,
2827
pub format: FormatSpec,
2928
}
3029

31-
impl<'a> Copy for Argument<'a> {}
32-
3330
#[doc(hidden)]
3431
pub struct FormatSpec {
3532
pub fill: char,
@@ -39,8 +36,6 @@ pub struct FormatSpec {
3936
pub width: Count,
4037
}
4138

42-
impl Copy for FormatSpec {}
43-
4439
/// Possible alignments that can be requested as part of a formatting directive.
4540
#[deriving(PartialEq)]
4641
pub enum Alignment {
@@ -54,22 +49,16 @@ pub enum Alignment {
5449
AlignUnknown,
5550
}
5651

57-
impl Copy for Alignment {}
58-
5952
#[doc(hidden)]
6053
pub enum Count {
6154
CountIs(uint), CountIsParam(uint), CountIsNextParam, CountImplied,
6255
}
6356

64-
impl Copy for Count {}
65-
6657
#[doc(hidden)]
6758
pub enum Position {
6859
ArgumentNext, ArgumentIs(uint)
6960
}
7061

71-
impl Copy for Position {}
72-
7362
/// Flags which can be passed to formatting via a directive.
7463
///
7564
/// These flags are discovered through the `flags` field of the `Formatter`
@@ -89,5 +78,3 @@ pub enum Flag {
8978
/// being aware of the sign to be printed.
9079
FlagSignAwareZeroPad,
9180
}
92-
93-
impl Copy for Flag {}

0 commit comments

Comments
 (0)