Skip to content

Commit 47a5b38

Browse files
committed
---
yaml --- r: 53237 b: refs/heads/dist-snap c: a29023e h: refs/heads/master i: 53235: 00665e5 v: v3
1 parent 06bd791 commit 47a5b38

File tree

29 files changed

+120
-454
lines changed

29 files changed

+120
-454
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: 44d4d6de762f3f9aae1fedcf454c66b79b3ad58d
10-
refs/heads/dist-snap: f68335113bf277f171494abb62a31293311f80c8
10+
refs/heads/dist-snap: a29023e9b2b42e94d77404496e72d0132aa44a6b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/Makefile.in

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer)
134134
CFG_LIBRUSTPKG :=$(call CFG_LIB_NAME,rustpkg)
135135
CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc)
136136
CFG_LIBRUSTI :=$(call CFG_LIB_NAME,rusti)
137-
CFG_LIBRUST :=$(call CFG_LIB_NAME,rust)
138137

139138
STDLIB_GLOB :=$(call CFG_LIB_GLOB,std)
140139
CORELIB_GLOB :=$(call CFG_LIB_GLOB,core)
@@ -144,7 +143,6 @@ LIBFUZZER_GLOB :=$(call CFG_LIB_GLOB,fuzzer)
144143
LIBRUSTPKG_GLOB :=$(call CFG_LIB_GLOB,rustpkg)
145144
LIBRUSTDOC_GLOB :=$(call CFG_LIB_GLOB,rustdoc)
146145
LIBRUSTI_GLOB :=$(call CFG_LIB_GLOB,rusti)
147-
LIBRUST_GLOB :=$(call CFG_LIB_GLOB,rust)
148146
STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std)
149147
CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core)
150148
LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc)
@@ -153,7 +151,6 @@ LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer)
153151
LIBRUSTPKG_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustpkg)
154152
LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc)
155153
LIBRUSTI_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rusti)
156-
LIBRUST_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rust)
157154

158155
# version-string calculation
159156
CFG_GIT_DIR := $(CFG_SRC_DIR).git
@@ -377,21 +374,18 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
377374
$$(HBIN$(1)_H_$(3))/rustpkg$$(X) \
378375
$$(HBIN$(1)_H_$(3))/rustdoc$$(X) \
379376
$$(HBIN$(1)_H_$(3))/rusti$$(X) \
380-
$$(HBIN$(1)_H_$(3))/rust$$(X) \
381377
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBFUZZER) \
382378
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTPKG) \
383379
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTDOC) \
384380
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUSTI) \
385-
$$(HLIB$(1)_H_$(3))/$$(CFG_LIBRUST) \
386381
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_CORELIB) \
387382
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_STDLIB) \
388383
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX) \
389384
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC) \
390385
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBFUZZER) \
391386
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTPKG) \
392387
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTDOC) \
393-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI) \
394-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUST)
388+
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTI)
395389

396390
ifeq ($(1),0)
397391
# Don't run the the stage0 compiler under valgrind - that ship has sailed

branches/dist-snap/mk/clean.mk

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ clean$(1)_H_$(2):
6868
$(Q)rm -f $$(HBIN$(1)_H_$(2))/serializer$(X)
6969
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rustdoc$(X)
7070
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rusti$(X)
71-
$(Q)rm -f $$(HBIN$(1)_H_$(2))/rust$(X)
7271
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBFUZZER)
7372
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTPKG)
7473
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTDOC)
@@ -78,7 +77,6 @@ clean$(1)_H_$(2):
7877
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTC)
7978
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBSYNTAX)
8079
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUSTI)
81-
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_LIBRUST)
8280
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CORELIB_GLOB)
8381
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(STDLIB_GLOB)
8482
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTC_GLOB)
@@ -87,7 +85,6 @@ clean$(1)_H_$(2):
8785
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTPKG_GLOB)
8886
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTDOC_GLOB)
8987
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUSTI_GLOB)
90-
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(LIBRUST_GLOB)
9188
$(Q)rm -f $$(HLIB$(1)_H_$(2))/$(CFG_RUSTLLVM)
9289
$(Q)rm -f $$(HLIB$(1)_H_$(2))/libstd.rlib
9390

branches/dist-snap/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ PKG_FILES := \
2727
driver \
2828
librustpkg \
2929
librusti \
30-
librust \
3130
librustc \
3231
compiletest \
3332
etc \

branches/dist-snap/mk/install.mk

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
6060
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTDOC_GLOB))
6161
$$(Q)$$(call INSTALL_LIB, \
6262
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUSTI_GLOB))
63-
$$(Q)$$(call INSTALL_LIB, \
64-
$$(TL$(1)$(2)),$$(PTL$(1)$(2)),$$(LIBRUST_GLOB))
6563
$$(Q)$$(call INSTALL,$$(TL$(1)$(2)),$$(PTL$(1)$(2)),libmorestack.a)
6664

6765
endef
@@ -92,18 +90,15 @@ install-host: $(CSREQ$(ISTAGE)_T_$(CFG_HOST_TRIPLE)_H_$(CFG_HOST_TRIPLE))
9290
$(Q)$(call INSTALL,$(HB2),$(PHB),rustpkg$(X))
9391
$(Q)$(call INSTALL,$(HB2),$(PHB),rustdoc$(X))
9492
$(Q)$(call INSTALL,$(HB2),$(PHB),rusti$(X))
95-
$(Q)$(call INSTALL,$(HB2),$(PHB),rust$(X))
9693
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTC))
9794
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTPKG))
9895
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTDOC))
9996
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUSTI))
100-
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_LIBRUST))
10197
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(CORELIB_GLOB))
10298
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(STDLIB_GLOB))
10399
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTC_GLOB))
104100
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBSYNTAX_GLOB))
105101
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUSTI_GLOB))
106-
$(Q)$(call INSTALL_LIB,$(HL),$(PHL),$(LIBRUST_GLOB))
107102
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUNTIME))
108103
$(Q)$(call INSTALL,$(HL),$(PHL),$(CFG_RUSTLLVM))
109104
$(Q)$(call INSTALL,$(S)/man, \
@@ -119,14 +114,12 @@ uninstall:
119114
$(Q)rm -f $(PHB)/rustc$(X)
120115
$(Q)rm -f $(PHB)/rustpkg$(X)
121116
$(Q)rm -f $(PHB)/rusti$(X)
122-
$(Q)rm -f $(PHB)/rust$(X)
123117
$(Q)rm -f $(PHB)/rustdoc$(X)
124118
$(Q)rm -f $(PHL)/$(CFG_RUSTLLVM)
125119
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTPKG)
126120
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTC)
127121
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTDOC)
128122
$(Q)rm -f $(PHL)/$(CFG_LIBRUSTI)
129-
$(Q)rm -f $(PHL)/$(CFG_LIBRUST)
130123
$(Q)rm -f $(PHL)/$(CFG_RUNTIME)
131124
$(Q)for i in \
132125
$(call HOST_LIB_FROM_HL_GLOB,$(CORELIB_GLOB)) \
@@ -136,7 +129,6 @@ uninstall:
136129
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTPKG_GLOB)) \
137130
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTDOC_GLOB)) \
138131
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUSTI_GLOB)) \
139-
$(call HOST_LIB_FROM_HL_GLOB,$(LIBRUST_GLOB)) \
140132
; \
141133
do rm -f $$i ; \
142134
done

branches/dist-snap/mk/pp.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ else
1919
$(S)src/test/*/*/*.rs) \
2020
$(wildcard $(S)src/fuzzer/*.rs) \
2121
$(wildcard $(S)src/rustpkg/*.rs) \
22-
$(wildcard $(S)src/rusti/*.rs) \
23-
$(wildcard $(S)src/rust/*.rs)
22+
$(wildcard $(S)src/rusti/*.rs)
2423

2524
PP_INPUTS_FILTERED = $(shell echo $(PP_INPUTS) | xargs grep -L \
2625
"no-reformat\|xfail-pretty\|xfail-test")

branches/dist-snap/mk/tests.mk

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
######################################################################
1515

1616
# The names of crates that must be tested
17-
TEST_CRATES = core std syntax rustc rustdoc rusti rust rustpkg
17+
TEST_CRATES = core std syntax rustc rustdoc rusti rustpkg
1818

1919
# Markdown files under doc/ that should have their code extracted and run
2020
DOC_TEST_NAMES = tutorial tutorial-ffi tutorial-macros tutorial-borrowed-ptr tutorial-tasks rust
@@ -241,12 +241,6 @@ $(3)/test/rustitest.stage$(1)-$(2)$$(X): \
241241
@$$(call E, compile_and_link: $$@)
242242
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
243243

244-
$(3)/test/rusttest.stage$(1)-$(2)$$(X): \
245-
$$(RUST_LIB) $$(RUST_INPUTS) \
246-
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
247-
@$$(call E, compile_and_link: $$@)
248-
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
249-
250244
$(3)/test/rustdoctest.stage$(1)-$(2)$$(X): \
251245
$$(RUSTDOC_LIB) $$(RUSTDOC_INPUTS) \
252246
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC)
@@ -470,20 +464,20 @@ $(foreach host,$(CFG_TARGET_TRIPLES), \
470464

471465
define DEF_RUN_DOC_TEST
472466

473-
DOC_TEST_ARGS$(1)-T-$(2)-H-$(3)-doc-$(4) := \
467+
DOC_TEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
474468
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
475469
--src-base $(3)/test/doc-$(4)/ \
476470
--build-base $(3)/test/doc-$(4)/ \
477471
--mode run-pass
478472

479-
check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4))
473+
check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
480474

481-
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): \
475+
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
482476
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
483477
doc-$(4)-extract$(3)
484478
@$$(call E, run doc-$(4): $$<)
485479
$$(Q)$$(call CFG_RUN_CTEST,$(1),$$<,$(3)) \
486-
$$(DOC_TEST_ARGS$(1)-T-$(2)-H-$(3)-doc-$(4)) \
480+
$$(DOC_TEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
487481
--logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),doc-$(4)) \
488482
&& touch $$@
489483

branches/dist-snap/mk/tools.mk

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ RUSTDOC_INPUTS := $(wildcard $(S)src/librustdoc/*.rs)
3030
RUSTI_LIB := $(S)src/librusti/rusti.rc
3131
RUSTI_INPUTS := $(wildcard $(S)src/librusti/*.rs)
3232

33-
# Rust, the convenience tool
34-
RUST_LIB := $(S)src/librust/rust.rc
35-
RUST_INPUTS := $(wildcard $(S)src/librust/*.rs)
36-
3733
# FIXME: These are only built for the host arch. Eventually we'll
3834
# have tools that need to built for other targets.
3935
define TOOLS_STAGE_N_TARGET
@@ -106,21 +102,6 @@ $$(TBIN$(1)_T_$(4)_H_$(3))/rusti$$(X): \
106102
@$$(call E, compile_and_link: $$@)
107103
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rusti -o $$@ $$<
108104

109-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST): \
110-
$$(RUST_LIB) $$(RUST_INPUTS) \
111-
$$(TSREQ$(1)_T_$(4)_H_$(3)) \
112-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
113-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
114-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC)
115-
@$$(call E, compile_and_link: $$@)
116-
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
117-
118-
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X): \
119-
$$(DRIVER_CRATE) \
120-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST)
121-
@$$(call E, compile_and_link: $$@)
122-
$$(STAGE$(1)_T_$(4)_H_$(3)) --cfg rust -o $$@ $$<
123-
124105
endef
125106

126107
define TOOLS_STAGE_N_HOST
@@ -204,23 +185,6 @@ $$(HBIN$(2)_H_$(4))/rusti$$(X): \
204185
@$$(call E, cp: $$@)
205186
$$(Q)cp $$< $$@
206187

207-
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUST): \
208-
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUST) \
209-
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
210-
$$(HSREQ$(2)_H_$(4))
211-
@$$(call E, cp: $$@)
212-
$$(Q)cp $$< $$@
213-
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_GLOB) \
214-
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUST_DSYM_GLOB)) \
215-
$$(HLIB$(2)_H_$(4))
216-
217-
$$(HBIN$(2)_H_$(4))/rust$$(X): \
218-
$$(TBIN$(1)_T_$(4)_H_$(3))/rust$$(X) \
219-
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUST) \
220-
$$(HSREQ$(2)_H_$(4))
221-
@$$(call E, cp: $$@)
222-
$$(Q)cp $$< $$@
223-
224188
endef
225189

226190
$(foreach host,$(CFG_TARGET_TRIPLES), \

branches/dist-snap/src/driver/driver.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ extern mod this(name = "rustdoc", vers = "0.6");
2323
#[cfg(rusti)]
2424
extern mod this(name = "rusti", vers = "0.6");
2525

26-
#[cfg(rust)]
27-
extern mod this(name = "rust", vers = "0.6");
28-
2926
#[cfg(rustc)]
3027
extern mod this(name = "rustc", vers = "0.6");
3128

branches/dist-snap/src/libcore/rand.rs

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use u32;
1818
use uint;
1919
use util;
2020
use vec;
21-
use libc::size_t;
2221

2322
/// A type that can be randomly generated using an RNG
2423
pub trait Rand {
@@ -121,9 +120,9 @@ enum rust_rng {}
121120

122121
#[abi = "cdecl"]
123122
extern mod rustrt {
124-
unsafe fn rand_seed_size() -> size_t;
125-
unsafe fn rand_gen_seed(buf: *mut u8, sz: size_t);
126-
unsafe fn rand_new_seeded(buf: *u8, sz: size_t) -> *rust_rng;
123+
unsafe fn rand_seed() -> ~[u8];
124+
unsafe fn rand_new() -> *rust_rng;
125+
unsafe fn rand_new_seeded2(&&seed: ~[u8]) -> *rust_rng;
127126
unsafe fn rand_next(rng: *rust_rng) -> u32;
128127
unsafe fn rand_free(rng: *rust_rng);
129128
}
@@ -389,18 +388,15 @@ impl Rng for @RandRes {
389388
/// Create a new random seed for seeded_rng
390389
pub fn seed() -> ~[u8] {
391390
unsafe {
392-
let n = rustrt::rand_seed_size() as uint;
393-
let mut s = vec::from_elem(n, 0_u8);
394-
do vec::as_mut_buf(s) |p, sz| {
395-
rustrt::rand_gen_seed(p, sz as size_t)
396-
}
397-
s
391+
rustrt::rand_seed()
398392
}
399393
}
400394

401395
/// Create a random number generator with a system specified seed
402396
pub fn Rng() -> Rng {
403-
seeded_rng(seed())
397+
unsafe {
398+
@RandRes(rustrt::rand_new()) as Rng
399+
}
404400
}
405401

406402
/**
@@ -409,15 +405,9 @@ pub fn Rng() -> Rng {
409405
* all other generators constructed with the same seed. The seed may be any
410406
* length.
411407
*/
412-
pub fn seeded_rng(seed: &[u8]) -> Rng {
413-
seeded_randres(seed) as Rng
414-
}
415-
416-
fn seeded_randres(seed: &[u8]) -> @RandRes {
408+
pub fn seeded_rng(seed: &~[u8]) -> Rng {
417409
unsafe {
418-
do vec::as_imm_buf(seed) |p, sz| {
419-
@RandRes(rustrt::rand_new_seeded(p, sz as size_t))
420-
}
410+
@RandRes(rustrt::rand_new_seeded2(*seed)) as Rng
421411
}
422412
}
423413

@@ -467,7 +457,7 @@ pub fn task_rng() -> Rng {
467457
match r {
468458
None => {
469459
unsafe {
470-
let rng = seeded_randres(seed());
460+
let rng = @RandRes(rustrt::rand_new());
471461
task::local_data::local_data_set(tls_rng_state, rng);
472462
rng as Rng
473463
}
@@ -493,24 +483,24 @@ pub mod tests {
493483
#[test]
494484
pub fn rng_seeded() {
495485
let seed = rand::seed();
496-
let ra = rand::seeded_rng(seed);
497-
let rb = rand::seeded_rng(seed);
486+
let ra = rand::seeded_rng(&seed);
487+
let rb = rand::seeded_rng(&seed);
498488
assert ra.gen_str(100u) == rb.gen_str(100u);
499489
}
500490

501491
#[test]
502492
pub fn rng_seeded_custom_seed() {
503493
// much shorter than generated seeds which are 1024 bytes
504-
let seed = [2u8, 32u8, 4u8, 32u8, 51u8];
505-
let ra = rand::seeded_rng(seed);
506-
let rb = rand::seeded_rng(seed);
494+
let seed = ~[2u8, 32u8, 4u8, 32u8, 51u8];
495+
let ra = rand::seeded_rng(&seed);
496+
let rb = rand::seeded_rng(&seed);
507497
assert ra.gen_str(100u) == rb.gen_str(100u);
508498
}
509499

510500
#[test]
511501
pub fn rng_seeded_custom_seed2() {
512-
let seed = [2u8, 32u8, 4u8, 32u8, 51u8];
513-
let ra = rand::seeded_rng(seed);
502+
let seed = ~[2u8, 32u8, 4u8, 32u8, 51u8];
503+
let ra = rand::seeded_rng(&seed);
514504
// Regression test that isaac is actually using the above vector
515505
let r = ra.next();
516506
error!("%?", r);

branches/dist-snap/src/libcore/to_str.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ impl ToStr for @str {
4343
pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
4444
}
4545

46-
// FIXME #4898: impl for one-tuples
47-
4846
impl<A: ToStr, B: ToStr> ToStr for (A, B) {
4947
#[inline(always)]
5048
pure fn to_str(&self) -> ~str {

branches/dist-snap/src/libcore/tuple.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ impl<A: Copy, B: Copy> ExtendedTupleOps<A,B> for (~[A], ~[B]) {
111111
}
112112
}
113113

114-
// FIXME #4898: impl for one-tuples
115-
116114
#[cfg(notest)]
117115
impl<A: Eq, B: Eq> Eq for (A, B) {
118116
#[inline(always)]

0 commit comments

Comments
 (0)