Skip to content

Commit 6db7606

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163673 b: refs/heads/snap-stage3 c: 4c00756 h: refs/heads/master i: 163671: 0ed7054 v: v3
1 parent 78de6fb commit 6db7606

File tree

7 files changed

+12
-25
lines changed

7 files changed

+12
-25
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: fa0383f38d4b165ad2285efade1bbdbb780cdfe5
4+
refs/heads/snap-stage3: 4c007568bfb27fc4ac6cc2dd485099836c6af702
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustdoc/clean/mod.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ pub enum Type {
11881188
PolyTraitRef(Vec<TyParamBound>),
11891189
}
11901190

1191-
#[deriving(Clone, Encodable, Decodable, PartialEq, Eq, Hash)]
1191+
#[deriving(Clone, Copy, Encodable, Decodable, PartialEq, Eq, Hash)]
11921192
pub enum PrimitiveType {
11931193
Int, I8, I16, I32, I64,
11941194
Uint, U8, U16, U32, U64,
@@ -1200,9 +1200,7 @@ pub enum PrimitiveType {
12001200
PrimitiveTuple,
12011201
}
12021202

1203-
impl Copy for PrimitiveType {}
1204-
1205-
#[deriving(Clone, Encodable, Decodable)]
1203+
#[deriving(Clone, Copy, Encodable, Decodable)]
12061204
pub enum TypeKind {
12071205
TypeEnum,
12081206
TypeFunction,
@@ -1215,8 +1213,6 @@ pub enum TypeKind {
12151213
TypeTypedef,
12161214
}
12171215

1218-
impl Copy for TypeKind {}
1219-
12201216
impl PrimitiveType {
12211217
fn from_str(s: &str) -> Option<PrimitiveType> {
12221218
match s.as_slice() {
@@ -1873,14 +1869,12 @@ impl Clean<Item> for doctree::Constant {
18731869
}
18741870
}
18751871

1876-
#[deriving(Show, Clone, Encodable, Decodable, PartialEq)]
1872+
#[deriving(Copy, Show, Clone, Encodable, Decodable, PartialEq)]
18771873
pub enum Mutability {
18781874
Mutable,
18791875
Immutable,
18801876
}
18811877

1882-
impl Copy for Mutability {}
1883-
18841878
impl Clean<Mutability> for ast::Mutability {
18851879
fn clean(&self, _: &DocContext) -> Mutability {
18861880
match self {

branches/snap-stage3/src/librustdoc/doctree.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl Module {
7070
}
7171
}
7272

73-
#[deriving(Show, Clone, Encodable, Decodable)]
73+
#[deriving(Copy, Show, Clone, Encodable, Decodable)]
7474
pub enum StructType {
7575
/// A normal struct
7676
Plain,
@@ -82,8 +82,6 @@ pub enum StructType {
8282
Unit
8383
}
8484

85-
impl Copy for StructType {}
86-
8785
pub enum TypeBound {
8886
RegionBound,
8987
TraitBound(ast::TraitRef)

branches/snap-stage3/src/librustdoc/html/format.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ use html::render::{cache, CURRENT_LOCATION_KEY};
2929

3030
/// Helper to render an optional visibility with a space after it (if the
3131
/// visibility is preset)
32+
#[deriving(Copy)]
3233
pub struct VisSpace(pub Option<ast::Visibility>);
3334
/// Similarly to VisSpace, this structure is used to render a function style with a
3435
/// space after it.
36+
#[deriving(Copy)]
3537
pub struct UnsafetySpace(pub ast::Unsafety);
3638
/// Wrapper struct for properly emitting a method declaration.
3739
pub struct Method<'a>(pub &'a clean::SelfTy, pub &'a clean::FnDecl);
3840
/// Similar to VisSpace, but used for mutability
41+
#[deriving(Copy)]
3942
pub struct MutableSpace(pub clean::Mutability);
4043
/// Similar to VisSpace, but used for mutability
44+
#[deriving(Copy)]
4145
pub struct RawMutableSpace(pub clean::Mutability);
4246
/// Wrapper struct for properly emitting the stability level.
4347
pub struct Stability<'a>(pub &'a Option<clean::Stability>);
@@ -48,11 +52,6 @@ pub struct WhereClause<'a>(pub &'a clean::Generics);
4852
/// Wrapper struct for emitting type parameter bounds.
4953
pub struct TyParamBounds<'a>(pub &'a [clean::TyParamBound]);
5054

51-
impl Copy for VisSpace {}
52-
impl Copy for UnsafetySpace {}
53-
impl Copy for MutableSpace {}
54-
impl Copy for RawMutableSpace {}
55-
5655
impl VisSpace {
5756
pub fn get(&self) -> Option<ast::Visibility> {
5857
let VisSpace(v) = *self; v

branches/snap-stage3/src/librustdoc/html/item_type.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use clean;
1919
/// discriminants. JavaScript then is used to decode them into the original value.
2020
/// Consequently, every change to this type should be synchronized to
2121
/// the `itemTypes` mapping table in `static/main.js`.
22-
#[deriving(PartialEq, Clone)]
22+
#[deriving(Copy, PartialEq, Clone)]
2323
pub enum ItemType {
2424
Module = 0,
2525
Struct = 1,
@@ -41,8 +41,6 @@ pub enum ItemType {
4141
Constant = 18,
4242
}
4343

44-
impl Copy for ItemType {}
45-
4644
impl ItemType {
4745
pub fn from_item(item: &clean::Item) -> ItemType {
4846
match item.inner {

branches/snap-stage3/src/librustdoc/html/render.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,12 @@ struct Source<'a>(&'a str);
225225
// Helper structs for rendering items/sidebars and carrying along contextual
226226
// information
227227

228+
#[deriving(Copy)]
228229
struct Item<'a> {
229230
cx: &'a Context,
230231
item: &'a clean::Item,
231232
}
232233

233-
impl<'a> Copy for Item<'a> {}
234-
235234
struct Sidebar<'a> { cx: &'a Context, item: &'a clean::Item, }
236235

237236
/// Struct representing one entry in the JS search index. These are all emitted

branches/snap-stage3/src/librustdoc/stability_summary.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use html::render::cache;
2727

2828
#[deriving(Zero, Encodable, Decodable, PartialEq, Eq)]
2929
/// The counts for each stability level.
30+
#[deriving(Copy)]
3031
pub struct Counts {
3132
pub deprecated: uint,
3233
pub experimental: uint,
@@ -39,8 +40,6 @@ pub struct Counts {
3940
pub unmarked: uint,
4041
}
4142

42-
impl Copy for Counts {}
43-
4443
impl Add<Counts, Counts> for Counts {
4544
fn add(self, other: Counts) -> Counts {
4645
Counts {

0 commit comments

Comments
 (0)