Skip to content

Commit 161bee3

Browse files
committed
---
yaml --- r: 64933 b: refs/heads/snap-stage3 c: 9824d90 h: refs/heads/master i: 64931: 753144c v: v3
1 parent f7e8079 commit 161bee3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5c6069c7a90761c120cecbd8e18317bce21dd213
4+
refs/heads/snap-stage3: 9824d90ffd7684eca7171c4e019fd85b9317904e
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/nil.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Functions for the unit type.
1616

1717
#[cfg(not(test))]
1818
use prelude::*;
19+
#[cfg(not(test))]
20+
use num::Zero;
21+
22+
1923

2024
#[cfg(not(test))]
2125
impl Eq for () {
@@ -48,3 +52,10 @@ impl TotalEq for () {
4852
#[inline]
4953
fn equals(&self, _other: &()) -> bool { true }
5054
}
55+
56+
#[cfg(not(test))]
57+
impl Zero for () {
58+
fn zero() -> () { () }
59+
fn is_zero(&self) -> bool { true }
60+
}
61+

branches/snap-stage3/src/test/run-pass/deriving-zero.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ struct Lots {
3434
h: ~[util::NonCopyable],
3535
i: @mut (int, int),
3636
j: bool,
37+
k: (),
3738
}
3839

3940
fn main() {

0 commit comments

Comments
 (0)