Skip to content

Commit fc4e900

Browse files
committed
---
yaml --- r: 146294 b: refs/heads/try2 c: e42e378 h: refs/heads/master v: v3
1 parent fbb65dc commit fc4e900

File tree

25 files changed

+106
-6900
lines changed

25 files changed

+106
-6900
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: fce9d7fc37650a5138be180e955a25a7f29409bd
8+
refs/heads/try2: e42e378f32e212997fc42281112b1c9c4c247de0
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/stage0.mk

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,13 @@ $$(HLIB0_H_$(1))/$(CFG_EXTRALIB_$(1)): \
9898
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(EXTRALIB_GLOB_$(1)) $$@
9999
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
100100

101-
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)):
102-
touch $$@
103-
# NOTE: this should get uncommented after a snapshot and the rule above this can
104-
# get deleted, right now we're not expecting a librustuv in a snapshot.
105-
# $$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
106-
# $$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
107-
# | $(HLIB0_H_$(1))/
108-
# @$$(call E, cp: $$@)
109-
# $$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
110-
# $$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
111-
# $$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
101+
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
102+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
103+
| $(HLIB0_H_$(1))/
104+
@$$(call E, cp: $$@)
105+
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
106+
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
107+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
112108

113109
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(1)): \
114110
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(1)) \

branches/try2/src/etc/vim/indent/rust.vim

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim indent file
22
" Language: Rust
33
" Author: Chris Morgan <[email protected]>
4-
" Last Change: 2013 Jul 10
4+
" Last Change: 2013 Oct 29
55

66
" Only load this indent file when no other was loaded.
77
if exists("b:did_indent")
@@ -104,8 +104,23 @@ function GetRustIndent(lnum)
104104
let prevline = s:get_line_trimmed(prevnonblank(a:lnum - 1))
105105
if prevline[len(prevline) - 1] == ","
106106
\ && s:get_line_trimmed(a:lnum) !~ "^\\s*[\\[\\]{}]"
107+
\ && prevline !~ "^\\s*fn\\s"
107108
" Oh ho! The previous line ended in a comma! I bet cindent will try to
108-
" take this too far... For now, let's use the previous line's indent
109+
" take this too far... For now, let's normally use the previous line's
110+
" indent.
111+
112+
" One case where this doesn't work out is where *this* line contains
113+
" square or curly brackets; then we normally *do* want to be indenting
114+
" further.
115+
"
116+
" Another case where we don't want to is one like a function
117+
" definition with arguments spread over multiple lines:
118+
"
119+
" fn foo(baz: Baz,
120+
" baz: Baz) // <-- cindent gets this right by itself
121+
"
122+
" There are probably other cases where we don't want to do this as
123+
" well. Add them as needed.
109124
return GetRustIndent(a:lnum - 1)
110125
endif
111126

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Maintainer: Ben Blum <[email protected]>
55
" Maintainer: Chris Morgan <[email protected]>
6-
" Last Change: 2013 Oct 19
6+
" Last Change: 2013 Oct 29
77

88
if version < 600
99
syntax clear
@@ -64,47 +64,45 @@ syn keyword rustEnumVariant Ok Err
6464
"syn keyword rustFunction from_str
6565

6666
" Types and traits {{{3
67+
syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
68+
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr ToBytesConsume
69+
syn keyword rustTrait Bool
6770
syn keyword rustTrait ToCStr
71+
syn keyword rustTrait Char
6872
syn keyword rustTrait Clone DeepClone
6973
syn keyword rustTrait Eq ApproxEq Ord TotalEq TotalOrd Ordering Equiv
7074
syn keyword rustEnumVariant Less Equal Greater
71-
syn keyword rustTrait Char
7275
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet
76+
syn keyword rustTrait Default
7377
syn keyword rustTrait Hash
74-
syn keyword rustTrait Times
78+
syn keyword rustTrait FromStr
7579
syn keyword rustTrait FromIterator Extendable
7680
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator ClonableIterator
7781
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
78-
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
79-
syn keyword rustTrait Orderable Signed Unsigned Round
82+
syn keyword rustTrait Times
83+
8084
syn keyword rustTrait Algebraic Trigonometric Exponential Hyperbolic
81-
syn keyword rustTrait Integer Fractional Real RealExt
8285
syn keyword rustTrait Bitwise BitCount Bounded
86+
syn keyword rustTrait Integer Fractional Real RealExt
87+
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
88+
syn keyword rustTrait Orderable Signed Unsigned Round
8389
syn keyword rustTrait Primitive Int Float ToStrRadix ToPrimitive FromPrimitive
84-
syn keyword rustTrait GenericPath
85-
syn keyword rustTrait Path
86-
syn keyword rustTrait PosixPath
87-
syn keyword rustTrait WindowsPath
90+
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
8891
syn keyword rustTrait RawPtr
89-
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr ToBytesConsume
9092
syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9193
syn keyword rustTrait Str StrVector StrSlice OwnedStr
92-
syn keyword rustTrait FromStr
9394
syn keyword rustTrait IterBytes
9495
syn keyword rustTrait ToStr ToStrConsume
9596
syn keyword rustTrait CopyableTuple ImmutableTuple
96-
syn keyword rustTrait Tuple1 ImmutableTuple1
97-
syn keyword rustTrait Tuple2 Tuple3 Tuple4 Tuple5
98-
syn keyword rustTrait Tuple6 Tuple7 Tuple8 Tuple9
99-
syn keyword rustTrait Tuple10 Tuple11 Tuple12
100-
syn keyword rustTrait ImmutableTuple2 ImmutableTuple3 ImmutableTuple4 ImmutableTuple5
101-
syn keyword rustTrait ImmutableTuple6 ImmutableTuple7 ImmutableTuple8 ImmutableTuple9
102-
syn keyword rustTrait ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
103-
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
97+
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
98+
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
99+
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
100+
syn keyword rustTrait ImmutableTuple1 ImmutableTuple2 ImmutableTuple3 ImmutableTuple4
101+
syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableTuple8
102+
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
104103
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
105104
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector
106-
syn keyword rustTrait Reader ReaderUtil Writer WriterUtil
107-
syn keyword rustTrait Default
105+
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
108106

109107
"syn keyword rustFunction stream
110108
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable

branches/try2/src/librustuv/rustuv.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,14 @@ impl<H, W: Watcher + NativeHandle<*H>> WatcherInterop for W {
232232
}
233233
}
234234

235-
fn close(self, cb: NullCallback) {
236-
let mut this = self;
235+
fn close(mut self, cb: NullCallback) {
237236
{
238-
let data = this.get_watcher_data();
237+
let data = self.get_watcher_data();
239238
assert!(data.close_cb.is_none());
240239
data.close_cb = Some(cb);
241240
}
242241

243-
unsafe { uvll::close(this.native_handle(), close_cb); }
242+
unsafe { uvll::close(self.native_handle(), close_cb); }
244243

245244
extern fn close_cb(handle: *uvll::uv_handle_t) {
246245
let mut h: Handle = NativeHandle::from_native_handle(handle);

branches/try2/src/librustuv/uvio.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,9 @@ trait HomingIO {
122122
a // return the result of the IO
123123
}
124124

125-
fn home_for_io_consume<A>(self, io: &fn(Self) -> A) -> A {
126-
let mut this = self;
127-
let home = this.go_to_IO_home();
128-
let a = io(this); // do IO
125+
fn home_for_io_consume<A>(mut self, io: &fn(Self) -> A) -> A {
126+
let home = self.go_to_IO_home();
127+
let a = io(self); // do IO
129128
HomingIO::restore_original_home(None::<Self>, home);
130129
a // return the result of the IO
131130
}
@@ -239,7 +238,7 @@ impl EventLoop for UvEventLoop {
239238
}
240239
}
241240

242-
#[cfg(not(stage0), not(test))]
241+
#[cfg(not(test))]
243242
#[lang = "event_loop_factory"]
244243
pub extern "C" fn new_loop() -> ~EventLoop {
245244
~UvEventLoop::new() as ~EventLoop

branches/try2/src/libstd/rt/crate_map.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use container::MutableSet;
1212
use hashmap::HashSet;
1313
use option::{Some, None, Option};
1414
use vec::ImmutableVector;
15-
#[cfg(not(stage0))]
1615
use rt::rtio::EventLoop;
1716

1817
// Need to tell the linker on OS X to not barf on undefined symbols
@@ -27,14 +26,6 @@ pub struct ModEntry<'self> {
2726
log_level: *mut u32
2827
}
2928

30-
#[cfg(stage0)]
31-
pub struct CrateMap<'self> {
32-
version: i32,
33-
entries: &'self [ModEntry<'self>],
34-
children: &'self [&'self CrateMap<'self>]
35-
}
36-
37-
#[cfg(not(stage0))]
3829
pub struct CrateMap<'self> {
3930
version: i32,
4031
entries: &'self [ModEntry<'self>],
@@ -45,12 +36,6 @@ pub struct CrateMap<'self> {
4536
#[cfg(not(windows))]
4637
pub fn get_crate_map() -> Option<&'static CrateMap<'static>> {
4738
extern {
48-
#[cfg(stage0)]
49-
#[weak_linkage]
50-
#[link_name = "_rust_crate_map_toplevel"]
51-
static CRATE_MAP: CrateMap<'static>;
52-
53-
#[cfg(not(stage0))]
5439
#[crate_map]
5540
static CRATE_MAP: CrateMap<'static>;
5641
}

branches/try2/src/libstd/rt/mod.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ pub mod io;
121121
/// The EventLoop and internal synchronous I/O interface.
122122
pub mod rtio;
123123

124-
/// libuv and default rtio implementation.
125-
#[cfg(stage0)]
126-
pub mod uv;
127-
128124
/// The Local trait for types that are accessible via thread-local
129125
/// or task-local storage.
130126
pub mod local;
@@ -463,13 +459,6 @@ pub fn in_green_task_context() -> bool {
463459
}
464460
}
465461

466-
#[cfg(stage0)]
467-
pub fn new_event_loop() -> ~rtio::EventLoop {
468-
use rt::uv::uvio::UvEventLoop;
469-
~UvEventLoop::new() as ~rtio::EventLoop
470-
}
471-
472-
#[cfg(not(stage0))]
473462
pub fn new_event_loop() -> ~rtio::EventLoop {
474463
#[fixed_stack_segment]; #[allow(cstack)];
475464

0 commit comments

Comments
 (0)