diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-24 16:36:30 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-25 11:20:38 -0500 |
| commit | bff462302b3e0a8f68c14cad2806c7ff5005364e (patch) | |
| tree | 1470a970b04f0e7df147ba87454eafc85f5a807c /src/test/run-pass/expr-if-struct.rs | |
| parent | 102ab57d8085fcb87c02dae929959ccaaa9af548 (diff) | |
| download | rust-bff462302b3e0a8f68c14cad2806c7ff5005364e.tar.gz rust-bff462302b3e0a8f68c14cad2806c7ff5005364e.zip | |
cleanup: s/impl Copy/#[derive(Copy)]/g
Diffstat (limited to 'src/test/run-pass/expr-if-struct.rs')
| -rw-r--r-- | src/test/run-pass/expr-if-struct.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/run-pass/expr-if-struct.rs b/src/test/run-pass/expr-if-struct.rs index 62994068a9e..f1457829d03 100644 --- a/src/test/run-pass/expr-if-struct.rs +++ b/src/test/run-pass/expr-if-struct.rs @@ -14,20 +14,17 @@ // Tests for if as expressions returning nominal types +#[derive(Copy)] struct I { i: int } -impl Copy for I {} - fn test_rec() { let rs = if true { I {i: 100} } else { I {i: 101} }; assert_eq!(rs.i, 100); } -#[derive(Show)] +#[derive(Copy, Show)] enum mood { happy, sad, } -impl Copy for mood {} - impl PartialEq for mood { fn eq(&self, other: &mood) -> bool { ((*self) as uint) == ((*other) as uint) |
