Skip to content

Commit cff78e5

Browse files
committed
---
yaml --- r: 50096 b: refs/heads/auto c: 5d40630 h: refs/heads/master v: v3
1 parent b73c257 commit cff78e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+2905
-2296
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: f9bb7b7768a00a31434952b05ad44202ffad2a11
17+
refs/heads/auto: 5d4063083bc366d1423572855f6320bb964d2a22
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167

branches/auto/doc/tutorial.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -579,29 +579,20 @@ Structs are quite similar to C structs and are even laid out the same way in
579579
memory (so you can read from a Rust struct in C, and vice-versa). Use the dot
580580
operator to access struct fields, as in `mypoint.x`.
581581

582-
~~~~
583-
struct Point {
584-
x: float,
585-
y: float
586-
}
587-
~~~~
588-
589582
Inherited mutability means that any field of a struct may be mutable, if the
590583
struct is in a mutable slot (or a field of a struct in a mutable slot, and
591584
so forth).
592585

593-
With a value (say, `mypoint`) of such a type in a mutable location, you can do
594-
`mypoint.y += 1.0`. But in an immutable location, such an assignment to a
595-
struct without inherited mutability would result in a type error.
596-
597-
~~~~ {.xfail-test}
598-
# struct Point { x: float, y: float }
599-
let mut mypoint = Point { x: 1.0, y: 1.0 };
600-
let origin = Point { x: 0.0, y: 0.0 };
601-
602-
mypoint.y += 1.0; // mypoint is mutable, and its fields as well
603-
origin.y += 1.0; // ERROR: assigning to immutable field
604586
~~~~
587+
struct Stack {
588+
content: ~[int],
589+
head: uint
590+
}
591+
~~~~
592+
593+
With a value (say, `mystack`) of such a type in a mutable location, you can do
594+
`mystack.head += 1`. But in an immutable location, such an assignment to a
595+
struct without inherited mutability would result in a type error.
605596

606597
`match` patterns destructure structs. The basic syntax is
607598
`Name { fieldname: pattern, ... }`:

branches/auto/mk/platform.mk

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -215,31 +215,31 @@ CFG_LDPATH_i686-apple-darwin :=
215215
CFG_RUN_i686-apple-darwin=$(2)
216216
CFG_RUN_TARG_i686-apple-darwin=$(call CFG_RUN_i686-apple-darwin,,$(2))
217217

218-
# arm-unknown-android configuration
219-
CC_arm-unknown-android=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
220-
CXX_arm-unknown-android=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
221-
CPP_arm-unknown-android=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
222-
AR_arm-unknown-android=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
223-
CFG_LIB_NAME_arm-unknown-android=lib$(1).so
224-
CFG_LIB_GLOB_arm-unknown-android=lib$(1)-*.so
225-
CFG_LIB_DSYM_GLOB_arm-unknown-android=lib$(1)-*.dylib.dSYM
226-
CFG_GCCISH_CFLAGS_arm-unknown-android := -Wall -g -fPIC -D__arm__ -DANDROID -D__ANDROID__
227-
CFG_GCCISH_CXXFLAGS_arm-unknown-android := -fno-rtti
228-
CFG_GCCISH_LINK_FLAGS_arm-unknown-android := -shared -fPIC -ldl -g -lm -lsupc++ -lgnustl_shared
229-
CFG_GCCISH_DEF_FLAG_arm-unknown-android := -Wl,--export-dynamic,--dynamic-list=
230-
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-android := -Wl,-whole-archive
231-
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-android := -Wl,-no-whole-archive -Wl,-znoexecstack
232-
CFG_DEF_SUFFIX_arm-unknown-android := .android.def
233-
CFG_INSTALL_NAME_arm-unknown-android =
234-
CFG_LIBUV_LINK_FLAGS_arm-unknown-android =
235-
CFG_EXE_SUFFIX_arm-unknown-android :=
236-
CFG_WINDOWSY_arm-unknown-android :=
237-
CFG_UNIXY_arm-unknown-android := 1
238-
CFG_PATH_MUNGE_arm-unknown-android := true
239-
CFG_LDPATH_arm-unknown-android :=
240-
CFG_RUN_arm-unknown-android=
241-
CFG_RUN_TARG_arm-unknown-android=
242-
RUSTC_FLAGS_arm-unknown-android :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
218+
# arm-linux-androideabi configuration
219+
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
220+
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
221+
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
222+
AR_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
223+
CFG_LIB_NAME_arm-linux-androideabi=lib$(1).so
224+
CFG_LIB_GLOB_arm-linux-androideabi=lib$(1)-*.so
225+
CFG_LIB_DSYM_GLOB_arm-linux-androideabi=lib$(1)-*.dylib.dSYM
226+
CFG_GCCISH_CFLAGS_arm-linux-androideabi := -Wall -g -fPIC -D__arm__ -DANDROID -D__ANDROID__
227+
CFG_GCCISH_CXXFLAGS_arm-linux-androideabi := -fno-rtti
228+
CFG_GCCISH_LINK_FLAGS_arm-linux-androideabi := -shared -fPIC -ldl -g -lm -lsupc++ -lgnustl_shared
229+
CFG_GCCISH_DEF_FLAG_arm-linux-androideabi := -Wl,--export-dynamic,--dynamic-list=
230+
CFG_GCCISH_PRE_LIB_FLAGS_arm-linux-androideabi := -Wl,-whole-archive
231+
CFG_GCCISH_POST_LIB_FLAGS_arm-linux-androideabi := -Wl,-no-whole-archive -Wl,-znoexecstack
232+
CFG_DEF_SUFFIX_arm-linux-androideabi := .android.def
233+
CFG_INSTALL_NAME_arm-linux-androideabi =
234+
CFG_LIBUV_LINK_FLAGS_arm-linux-androideabi =
235+
CFG_EXE_SUFFIX_arm-linux-androideabi :=
236+
CFG_WINDOWSY_arm-linux-androideabi :=
237+
CFG_UNIXY_arm-linux-androideabi := 1
238+
CFG_PATH_MUNGE_arm-linux-androideabi := true
239+
CFG_LDPATH_arm-linux-androideabi :=
240+
CFG_RUN_arm-linux-androideabi=
241+
CFG_RUN_TARG_arm-linux-androideabi=
242+
RUSTC_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
243243

244244
# i686-pc-mingw32 configuration
245245
CC_i686-pc-mingw32=$(CC)
@@ -267,22 +267,22 @@ CFG_RUN_i686-pc-mingw32=PATH="$(CFG_LDPATH_i686-pc-mingw32):$(1)" $(2)
267267
CFG_RUN_TARG_i686-pc-mingw32=$(call CFG_RUN_i686-pc-mingw32,$(HLIB$(1)_H_$(CFG_BUILD_TRIPLE)),$(2))
268268

269269
# i586-mingw32msvc configuration
270-
CC_i586-mingw32msvc=$(CC)
271-
CXX_i586-mingw32msvc=$(CXX)
272-
CPP_i586-mingw32msvc=$(CPP)
273-
AR_i586-mingw32msvc=$(AR)
270+
CC_i586-mingw32msvc=$(CFG_MINGW32_CROSS_PATH)/bin/i586-mingw32msvc-gcc
271+
CXX_i586-mingw32msvc=$(CFG_MINGW32_CROSS_PATH)/bin/i586-mingw32msvc-g++
272+
CPP_i586-mingw32msvc=$(CFG_MINGW32_CROSS_PATH)/bin/i586-mingw32msvc-cpp
273+
AR_i586-mingw32msvc=$(CFG_MINGW32_CROSS_PATH)/bin/i586-mingw32msvc-ar
274274
CFG_LIB_NAME_i586-mingw32msvc=$(1).dll
275275
CFG_LIB_GLOB_i586-mingw32msvc=$(1)-*.dll
276276
CFG_LIB_DSYM_GLOB_i586-mingw32msvc=$(1)-*.dylib.dSYM
277-
CFG_GCCISH_CFLAGS_i586-mingw32msvc := -Wall -Werror -g -march=586 -m32
277+
CFG_GCCISH_CFLAGS_i586-mingw32msvc := -Wall -Werror -g -march=i586 -m32
278278
CFG_GCCISH_CXXFLAGS_i586-mingw32msvc := -fno-rtti
279279
CFG_GCCISH_LINK_FLAGS_i586-mingw32msvc := -shared -g -m32
280280
CFG_GCCISH_DEF_FLAG_i586-mingw32msvc :=
281281
CFG_GCCISH_PRE_LIB_FLAGS_i586-mingw32msvc :=
282282
CFG_GCCISH_POST_LIB_FLAGS_i586-mingw32msvc :=
283283
CFG_DEF_SUFFIX_i586-mingw32msvc := .mingw32.def
284284
CFG_INSTALL_NAME_i586-mingw32msvc =
285-
CFG_LIBUV_LINK_FLAGS_i586-mingw32msvc := -lWs2_32 -lpsapi -liphlpapi
285+
CFG_LIBUV_LINK_FLAGS_i586-mingw32msvc := -L$(CFG_MINGW32_CROSS_PATH)/i586-mingw32msvc/lib -lws2_32 -lpsapi -liphlpapi
286286
CFG_EXE_SUFFIX_i586-mingw32msvc := .exe
287287
CFG_WINDOWSY_i586-mingw32msvc := 1
288288
CFG_UNIXY_i586-mingw32msvc :=
@@ -342,7 +342,7 @@ define CFG_MAKE_TOOLCHAIN
342342
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
343343
$$(call CFG_INSTALL_NAME_$(1),$$(4))
344344

345-
ifneq ($(1),arm-unknown-android)
345+
ifneq ($(1),arm-linux-androideabi)
346346

347347
# We're using llvm-mc as our assembler because it supports
348348
# .cfi pseudo-ops on mac
@@ -356,7 +356,7 @@ define CFG_MAKE_TOOLCHAIN
356356

357357
# For the Android cross, use the Android assembler
358358
# XXX: We should be able to use the LLVM assembler
359-
CFG_ASSEMBLE_$(1)=$$(CXX_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
359+
CFG_ASSEMBLE_$(1)=$$(CPP_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
360360

361361
endif
362362

branches/auto/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ else ifeq ($(OSTYPE_$(1)), apple-darwin)
9292
else ifeq ($(OSTYPE_$(1)), unknown-freebsd)
9393
LIBUV_OSTYPE_$(1) := unix/freebsd
9494
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
95-
else ifeq ($(OSTYPE_$(1)), unknown-android)
95+
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
9696
LIBUV_OSTYPE_$(1) := unix/android
9797
LIBUV_LIB_$(1) := rt/$(1)/libuv/libuv.a
9898
else
@@ -164,7 +164,7 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
164164
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
165165
OS=mingw \
166166
V=$$(VERBOSE)
167-
else ifeq ($(OSTYPE_$(1)), unknown-android)
167+
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
168168
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
169169
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
170170
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \

branches/auto/src/compiletest/runtest.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,19 @@ actual:\n\
208208
testfile: &Path, src: ~str) -> ProcRes {
209209
compose_and_run_compiler(
210210
config, props, testfile,
211-
make_typecheck_args(config, testfile),
211+
make_typecheck_args(config, props, testfile),
212212
Some(src))
213213
}
214214

215-
fn make_typecheck_args(config: config, testfile: &Path) -> ProcArgs {
215+
fn make_typecheck_args(config: config, props: TestProps, testfile: &Path) -> ProcArgs {
216216
let prog = config.rustc_path;
217217
let mut args = ~[~"-",
218218
~"--no-trans", ~"--lib",
219219
~"-L", config.build_base.to_str(),
220220
~"-L",
221221
aux_output_dir_name(config, testfile).to_str()];
222222
args += split_maybe_args(config.rustcflags);
223+
args += split_maybe_args(props.compile_flags);
223224
return ProcArgs {prog: prog.to_str(), args: args};
224225
}
225226
}

branches/auto/src/etc/x86.supp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,21 @@
451451
fun:*uv_loop_delete*
452452
}
453453

454+
{
455+
race-or-something-ask-pcwalton-0
456+
Memcheck:Value4
457+
fun:*task_start_wrapper*
458+
...
459+
}
460+
461+
{
462+
race-or-something-ask-pcwalton-1
463+
Memcheck:Value4
464+
...
465+
fun:*build_start_wrapper*
466+
...
467+
}
468+
454469
{
455470
lock_and_signal-probably-threadsafe-access-outside-of-lock
456471
Helgrind:Race

branches/auto/src/libcore/comm.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ pub fn stream<T:Owned>() -> (Port<T>, Chan<T>) {
110110
// required.
111111
#[cfg(stage1)]
112112
#[cfg(stage2)]
113+
#[cfg(stage3)]
113114
pub impl<T: Owned> Chan<T> {
114115
fn send(&self, x: T) { chan_send(self, x) }
115116
fn try_send(&self, x: T) -> bool { chan_try_send(self, x) }
@@ -149,6 +150,7 @@ fn chan_try_send<T:Owned>(self: &Chan<T>, x: T) -> bool {
149150
// Use an inherent impl so that imports are not required:
150151
#[cfg(stage1)]
151152
#[cfg(stage2)]
153+
#[cfg(stage3)]
152154
pub impl<T: Owned> Port<T> {
153155
fn recv(&self) -> T { port_recv(self) }
154156
fn try_recv(&self) -> Option<T> { port_try_recv(self) }
@@ -226,6 +228,7 @@ pub fn PortSet<T: Owned>() -> PortSet<T>{
226228
// Use an inherent impl so that imports are not required:
227229
#[cfg(stage1)]
228230
#[cfg(stage2)]
231+
#[cfg(stage3)]
229232
pub impl<T:Owned> PortSet<T> {
230233
fn recv(&self) -> T { port_set_recv(self) }
231234
fn try_recv(&self) -> Option<T> { port_set_try_recv(self) }
@@ -301,6 +304,7 @@ pub type SharedChan<T> = unstable::Exclusive<Chan<T>>;
301304
302305
#[cfg(stage1)]
303306
#[cfg(stage2)]
307+
#[cfg(stage3)]
304308
pub impl<T: Owned> SharedChan<T> {
305309
fn send(&self, x: T) { shared_chan_send(self, x) }
306310
fn try_send(&self, x: T) -> bool { shared_chan_try_send(self, x) }

branches/auto/src/libcore/io.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ use libc;
2121
use libc::{c_int, c_long, c_uint, c_void, size_t, ssize_t};
2222
use libc::consts::os::posix88::*;
2323
use os;
24-
use prelude::*;
24+
use cast;
25+
use path::Path;
26+
use ops::Drop;
2527
use ptr;
2628
use result;
2729
use str;
@@ -75,6 +77,7 @@ pub trait Reader {
7577

7678
#[cfg(stage1)]
7779
#[cfg(stage2)]
80+
#[cfg(stage3)]
7881
impl Reader for @Reader {
7982
fn read(&self, bytes: &mut [u8], len: uint) -> uint {
8083
self.read(bytes, len)
@@ -657,6 +660,7 @@ pub trait Writer {
657660
658661
#[cfg(stage1)]
659662
#[cfg(stage2)]
663+
#[cfg(stage3)]
660664
impl Writer for @Writer {
661665
fn write(&self, v: &[const u8]) { self.write(v) }
662666
fn seek(&self, a: int, b: SeekStyle) { self.seek(a, b) }
@@ -986,7 +990,7 @@ pub trait WriterUtil {
986990

987991
impl<T:Writer> WriterUtil for T {
988992
fn write_char(&self, ch: char) {
989-
if ch as uint < 128u {
993+
if (ch as uint) < 128u {
990994
self.write(&[ch as u8]);
991995
} else {
992996
self.write_str(str::from_char(ch));

branches/auto/src/libcore/libc.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,8 @@ pub mod funcs {
12211221
#[nolink]
12221222
#[abi = "cdecl"]
12231223
pub mod fcntl {
1224+
use libc::types::os::arch::c95::{c_int, c_char};
12241225
pub extern {
1225-
use libc::types::os::arch::c95::{c_int, c_char};
1226-
12271226
#[link_name = "_open"]
12281227
unsafe fn open(path: *c_char, oflag: c_int, mode: c_int)
12291228
-> c_int;
@@ -1562,11 +1561,11 @@ pub mod funcs {
15621561
#[cfg(target_os = "macos")]
15631562
#[cfg(target_os = "freebsd")]
15641563
pub mod bsd44 {
1564+
use libc::types::common::c95::{c_void};
1565+
use libc::types::os::arch::c95::{c_char, c_int, c_uint, size_t};
1566+
15651567
#[abi = "cdecl"]
15661568
pub extern {
1567-
use libc::types::common::c95::{c_void};
1568-
use libc::types::os::arch::c95::{c_char, c_int, c_uint, size_t};
1569-
15701569
unsafe fn sysctl(name: *c_int, namelen: c_uint,
15711570
oldp: *mut c_void, oldlenp: *mut size_t,
15721571
newp: *c_void, newlen: size_t) -> c_int;

branches/auto/src/libcore/num/strconv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ pub pure fn to_str_bytes_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
165165
Div<T,T>+Neg<T>+Modulo<T,T>+Mul<T,T>>(
166166
num: &T, radix: uint, negative_zero: bool,
167167
sign: SignFormat, digits: SignificantDigits) -> (~[u8], bool) {
168-
if radix as int < 2 {
168+
if (radix as int) < 2 {
169169
fail!(fmt!("to_str_bytes_common: radix %? to low, \
170170
must lie in the range [2, 36]", radix));
171171
} else if radix as int > 36 {
@@ -455,10 +455,10 @@ pub pure fn from_str_bytes_common<T:NumCast+Zero+One+Ord+Copy+Div<T,T>+
455455
_ if special && radix >= DIGIT_I_RADIX // first digit of 'inf'
456456
=> fail!(fmt!("from_str_bytes_common: radix %? incompatible with \
457457
special values 'inf' and 'NaN'", radix)),
458-
_ if radix as int < 2
458+
_ if (radix as int) < 2
459459
=> fail!(fmt!("from_str_bytes_common: radix %? to low, \
460460
must lie in the range [2, 36]", radix)),
461-
_ if radix as int > 36
461+
_ if (radix as int) > 36
462462
=> fail!(fmt!("from_str_bytes_common: radix %? to high, \
463463
must lie in the range [2, 36]", radix)),
464464
_ => ()

branches/auto/src/libcore/prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
4343
pub use vec::{CopyableVector, ImmutableVector};
4444
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
4545
pub use vec::{OwnedVector, OwnedCopyableVector};
46+
pub use io::{Reader, ReaderUtil, Writer, WriterUtil};
4647

4748
/* Reexported runtime types */
4849
pub use comm::{stream, Port, Chan, GenericChan, GenericSmartChan, GenericPort, Peekable};

branches/auto/src/libcore/repr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ pub impl ReprVisitor {
218218

219219
fn write_escaped_slice(&self, slice: &str) {
220220
self.writer.write_char('"');
221-
for str::chars_each(slice) |ch| {
221+
for slice.each_char |ch| {
222222
self.writer.write_escaped_char(ch);
223223
}
224224
self.writer.write_char('"');
@@ -242,7 +242,7 @@ pub impl ReprVisitor {
242242
let (sz, al) = unsafe { ((*inner).size, (*inner).align) };
243243
self.writer.write_char('[');
244244
let mut first = true;
245-
while p as uint < end as uint {
245+
while (p as uint) < (end as uint) {
246246
if first {
247247
first = false;
248248
} else {

branches/auto/src/libcore/rt/env.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ pub fn get() -> &Environment {
4444

4545
extern {
4646
fn rust_get_rt_env() -> &Environment;
47-
}
47+
}

branches/auto/src/libcore/rt/sched.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ enum CleanupJob {
7070

7171
pub impl Scheduler {
7272

73-
static fn new(event_loop: ~EventLoopObject) -> Scheduler {
73+
static pub fn new(event_loop: ~EventLoopObject) -> Scheduler {
7474
Scheduler {
7575
event_loop: event_loop,
7676
task_queue: WorkQueue::new(),
@@ -296,7 +296,7 @@ pub struct Task {
296296
}
297297

298298
impl Task {
299-
static fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
299+
static pub fn new(stack_pool: &mut StackPool, start: ~fn()) -> Task {
300300
// XXX: Putting main into a ~ so it's a thin pointer and can
301301
// be passed to the spawn function. Another unfortunate
302302
// allocation

branches/auto/src/libcore/rt/stack.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ pub impl StackSegment {
3737
pub struct StackPool(());
3838

3939
impl StackPool {
40-
41-
static fn new() -> StackPool { StackPool(()) }
40+
static pub fn new() -> StackPool { StackPool(()) }
4241

4342
fn take_segment(&self, min_size: uint) -> StackSegment {
4443
StackSegment::new(min_size)

branches/auto/src/libcore/rt/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct Thread {
2020
}
2121

2222
impl Thread {
23-
static fn start(main: ~fn()) -> Thread {
23+
static pub fn start(main: ~fn()) -> Thread {
2424
fn substart(main: &fn()) -> *raw_thread {
2525
unsafe { rust_raw_thread_start(&main) }
2626
}

0 commit comments

Comments
 (0)