Skip to content

Commit 04887ae

Browse files
committed
---
yaml --- r: 142823 b: refs/heads/try2 c: 948334f h: refs/heads/master i: 142821: 60e9407 142819: c161c1e 142815: 7bcb73b v: v3
1 parent c052339 commit 04887ae

File tree

5 files changed

+23
-54
lines changed

5 files changed

+23
-54
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 403cdd84a4e9f01848445255078cce6bcebae8e3
8+
refs/heads/try2: 948334f33398f0ba073107585b8dfaa0dc9feaa9
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/cmp.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,19 @@ pub fn lexical_ordering(o1: Ordering, o2: Ordering) -> Ordering {
157157
/**
158158
* Trait for values that can be compared for a sort-order.
159159
*
160-
* Ord only requires implementation of the `lt` method,
161-
* with the others generated from default implementations.
162-
*
163-
* However it remains possible to implement the others separately,
164-
* for compatibility with floating-point NaN semantics
160+
* Eventually this may be simplified to only require
161+
* an `le` method, with the others generated from
162+
* default implementations. However it should remain
163+
* possible to implement the others separately, for
164+
* compatibility with floating-point NaN semantics
165165
* (cf. IEEE 754-2008 section 5.11).
166166
*/
167-
#[allow(default_methods)] // NOTE: Remove when allowed in stage0
168167
#[lang="ord"]
169168
pub trait Ord {
170169
fn lt(&self, other: &Self) -> bool;
171-
fn le(&self, other: &Self) -> bool { !other.lt(self) }
172-
fn gt(&self, other: &Self) -> bool { other.lt(self) }
173-
fn ge(&self, other: &Self) -> bool { !self.lt(other) }
170+
fn le(&self, other: &Self) -> bool;
171+
fn ge(&self, other: &Self) -> bool;
172+
fn gt(&self, other: &Self) -> bool;
174173
}
175174

176175
/// The equivalence relation. Two values may be equivalent even if they are

branches/try2/src/libsyntax/ext/expand.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,18 @@ pub fn core_macros() -> @str {
643643
$(if $pred $body)else+
644644
);
645645
)
646+
647+
macro_rules! print(
648+
($( $arg:expr),+) => ( {
649+
print(fmt!($($arg),+));
650+
} )
651+
)
652+
653+
macro_rules! println(
654+
($( $arg:expr),+) => ( {
655+
println(fmt!($($arg),+));
656+
} )
657+
)
646658
}";
647659
}
648660

branches/try2/src/test/compile-fail/issue-3344.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// except according to those terms.
1010

1111
struct thing(uint);
12-
impl Ord for thing { //~ ERROR missing method `lt`
12+
impl Ord for thing { //~ ERROR missing method `gt`
13+
fn lt(&self, other: &thing) -> bool { **self < **other }
1314
fn le(&self, other: &thing) -> bool { **self < **other }
1415
fn ge(&self, other: &thing) -> bool { **self < **other }
1516
}

branches/try2/src/test/run-pass/cmp-default.rs

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)