Skip to content

Commit dbaaab4

Browse files
committed
---
yaml --- r: 145079 b: refs/heads/try2 c: 561f1b0 h: refs/heads/master i: 145077: a04b363 145075: 4f54aca 145071: aa641b2 v: v3
1 parent a715e84 commit dbaaab4

File tree

6 files changed

+13
-87
lines changed

6 files changed

+13
-87
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: cf7e93ff2571140abf299212ec9ebc0fcd9944eb
8+
refs/heads/try2: 561f1b006321501dfe5a059444fc8f560010c2ba
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/comm.rs

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ pub fn stream<T: Send>() -> (Port<T>, Chan<T>) {
6666
(Port { x: p }, Chan { x: c })
6767
}
6868

69+
pub struct SharedChan<T> { x: rtcomm::SharedChan<T> }
70+
71+
impl<T: Send> SharedChan<T> {
72+
pub fn new(c: Chan<T>) -> SharedChan<T> {
73+
let Chan { x: c } = c;
74+
SharedChan { x: rtcomm::SharedChan::new(c) }
75+
}
76+
}
77+
6978
impl<T: Send> ChanOne<T> {
7079
pub fn send(self, val: T) {
7180
let ChanOne { x: c } = self;
@@ -152,16 +161,6 @@ impl<T: Send> Peekable<T> for Port<T> {
152161
}
153162
}
154163

155-
156-
pub struct SharedChan<T> { x: rtcomm::SharedChan<T> }
157-
158-
impl<T: Send> SharedChan<T> {
159-
pub fn new(c: Chan<T>) -> SharedChan<T> {
160-
let Chan { x: c } = c;
161-
SharedChan { x: rtcomm::SharedChan::new(c) }
162-
}
163-
}
164-
165164
impl<T: Send> GenericChan<T> for SharedChan<T> {
166165
fn send(&self, val: T) {
167166
let &SharedChan { x: ref c } = self;
@@ -194,31 +193,3 @@ impl<T> Clone for SharedChan<T> {
194193
SharedChan { x: c.clone() }
195194
}
196195
}
197-
198-
pub struct SharedPort<T> { x: rtcomm::SharedPort<T> }
199-
200-
impl<T: Send> SharedPort<T> {
201-
pub fn new(p: Port<T>) -> SharedPort<T> {
202-
let Port { x: p } = p;
203-
SharedPort { x: rtcomm::SharedPort::new(p) }
204-
}
205-
}
206-
207-
impl<T: Send> GenericPort<T> for SharedPort<T> {
208-
fn recv(&self) -> T {
209-
let &SharedPort { x: ref p } = self;
210-
p.recv()
211-
}
212-
213-
fn try_recv(&self) -> Option<T> {
214-
let &SharedPort { x: ref p } = self;
215-
p.try_recv()
216-
}
217-
}
218-
219-
impl<T> Clone for SharedPort<T> {
220-
fn clone(&self) -> SharedPort<T> {
221-
let &SharedPort { x: ref p } = self;
222-
SharedPort { x: p.clone() }
223-
}
224-
}

branches/try2/src/libstd/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ pub fn count<A>(start: A, step: A) -> Counter<A> {
17191719
Counter{state: start, step: step}
17201720
}
17211721

1722-
/// A range of numbers from [0, N)
1722+
/// An iterator over the range [start, stop)
17231723
#[deriving(Clone, DeepClone)]
17241724
pub struct Range<A> {
17251725
priv state: A,
@@ -1765,7 +1765,7 @@ impl<A: Sub<A, A> + Integer + Ord + Clone> DoubleEndedIterator<A> for Range<A> {
17651765
}
17661766
}
17671767

1768-
/// A range of numbers from [0, N]
1768+
/// An iterator over the range [start, stop]
17691769
#[deriving(Clone, DeepClone)]
17701770
pub struct RangeInclusive<A> {
17711771
priv range: Range<A>,

branches/try2/src/libstd/rt/io/timer.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ use rt::local::Local;
1717

1818
pub struct Timer(~RtioTimerObject);
1919

20-
/// Sleep the current task for `msecs` milliseconds.
21-
pub fn sleep(msecs: u64) {
22-
let mut timer = Timer::new().expect("timer::sleep: could not create a Timer");
23-
24-
timer.sleep(msecs)
25-
}
26-
2720
impl Timer {
2821

2922
pub fn new() -> Option<Timer> {
@@ -59,11 +52,4 @@ mod test {
5952
do timer.map_move |mut t| { t.sleep(1) };
6053
}
6154
}
62-
63-
#[test]
64-
fn test_io_timer_sleep_standalone() {
65-
do run_in_mt_newsched_task {
66-
sleep(1)
67-
}
68-
}
6955
}

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

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,8 @@ pub fn expand_expr(extsbox: @mut SyntaxEnv,
7676
// mark before:
7777
let marked_before = mark_tts(*tts,fm);
7878
let marked_ctxt = new_mark(fm, ctxt);
79-
80-
// The span that we pass to the expanders we want to
81-
// be the root of the call stack. That's the most
82-
// relevant span and it's the actual invocation of
83-
// the macro.
84-
let mut relevant_info = cx.backtrace();
85-
let mut einfo = relevant_info.unwrap();
86-
loop {
87-
match relevant_info {
88-
None => { break }
89-
Some(e) => {
90-
einfo = e;
91-
relevant_info = einfo.call_site.expn_info;
92-
}
93-
}
94-
}
95-
9679
let expanded =
97-
match expandfun(cx, einfo.call_site,
98-
marked_before, marked_ctxt) {
80+
match expandfun(cx, mac.span, marked_before, marked_ctxt) {
9981
MRExpr(e) => e,
10082
MRAny(expr_maker,_,_) => expr_maker(),
10183
_ => {

branches/try2/src/test/compile-fail/debug-correct-span.rs

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

0 commit comments

Comments
 (0)