Skip to content

Commit d06f1db

Browse files
committed
---
yaml --- r: 42349 b: refs/heads/master c: e4c7d8e h: refs/heads/master i: 42347: 9f32cb4 v: v3
1 parent 57d0dde commit d06f1db

File tree

24 files changed

+204
-385
lines changed

24 files changed

+204
-385
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: fa69739320d84956ccea20f2f6b526d64d6e9504
2+
refs/heads/master: e4c7d8ec8764d1daf8b247c359d564daea1c113c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/RELEASES.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
Version 0.6 (?)
2-
---------------------------
3-
4-
* Libraries
5-
* `core::send_map` renamed to `core::hashmap`
6-
71
Version 0.5 (December 2012)
82
---------------------------
93

trunk/mk/docs.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ doc/rust.html: rust.md doc/version_info.html doc/rust.css doc/manual.css
4545
--from=markdown --to=html \
4646
--css=rust.css \
4747
--css=manual.css \
48-
--include-before-body=doc/version_info.html \
48+
--include-before-body=doc/version_info.html \
4949
--output=$@
5050
endif
5151

@@ -66,7 +66,6 @@ doc/rust.tex: rust.md doc/version.md
6666
"$(CFG_PANDOC)" \
6767
--standalone --toc \
6868
--number-sections \
69-
--include-before-body=doc/version.md \
7069
--from=markdown --to=latex \
7170
--output=$@
7271

@@ -200,17 +199,16 @@ ifdef CFG_DISABLE_DOCS
200199
endif
201200

202201

203-
doc/version.md: $(MKFILE_DEPS) $(wildcard $(S)doc/*.*)
202+
doc/version.md: $(MKFILE_DEPS) rust.md
204203
@$(call E, version-stamp: $@)
205204
$(Q)echo "$(CFG_VERSION)" >$@
206205

207-
doc/version_info.html: version_info.html.template $(MKFILE_DEPS) \
208-
$(wildcard $(S)doc/*.*)
206+
doc/version_info.html: version_info.html.template
209207
@$(call E, version-info: $@)
210208
sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
211209
$(CFG_VER_HASH) | head -c 8)/;\
212210
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
213211

214-
GENERATED += doc/version.md doc/version_info.html
212+
GENERATED += doc/version.md
215213

216214
docs: $(DOCS)

trunk/src/libcore/hashmap.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ pub mod linear {
4949
buckets: ~[Option<Bucket<K, V>>],
5050
}
5151

52-
// We could rewrite FoundEntry to have type Option<&Bucket<K, V>>
53-
// which would be nifty
52+
// FIXME(#3148) -- we could rewrite FoundEntry
53+
// to have type Option<&Bucket<K, V>> which would be nifty
54+
// However, that won't work until #3148 is fixed
5455
enum SearchResult {
5556
FoundEntry(uint), FoundHole(uint), TableFull
5657
}
@@ -295,6 +296,8 @@ pub mod linear {
295296
FoundEntry(idx) => {
296297
match self.buckets[idx] {
297298
Some(ref bkt) => {
299+
// FIXME(#3148)---should be inferred
300+
let bkt: &self/Bucket<K, V> = bkt;
298301
Some(&bkt.value)
299302
}
300303
None => {

trunk/src/libcore/rand.rs

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -23,102 +23,6 @@ use uint;
2323
use util;
2424
use vec;
2525

26-
/// A type that can be randomly generated using an RNG
27-
pub trait Rand {
28-
static fn rand(rng: rand::Rng) -> Self;
29-
}
30-
31-
impl int: Rand {
32-
static fn rand(rng: rand::Rng) -> int {
33-
rng.gen_int()
34-
}
35-
}
36-
37-
impl i8: Rand {
38-
static fn rand(rng: rand::Rng) -> i8 {
39-
rng.gen_i8()
40-
}
41-
}
42-
43-
impl i16: Rand {
44-
static fn rand(rng: rand::Rng) -> i16 {
45-
rng.gen_i16()
46-
}
47-
}
48-
49-
impl i32: Rand {
50-
static fn rand(rng: rand::Rng) -> i32 {
51-
rng.gen_i32()
52-
}
53-
}
54-
55-
impl i64: Rand {
56-
static fn rand(rng: rand::Rng) -> i64 {
57-
rng.gen_i64()
58-
}
59-
}
60-
61-
impl u8: Rand {
62-
static fn rand(rng: rand::Rng) -> u8 {
63-
rng.gen_u8()
64-
}
65-
}
66-
67-
impl u16: Rand {
68-
static fn rand(rng: rand::Rng) -> u16 {
69-
rng.gen_u16()
70-
}
71-
}
72-
73-
impl u32: Rand {
74-
static fn rand(rng: rand::Rng) -> u32 {
75-
rng.gen_u32()
76-
}
77-
}
78-
79-
impl u64: Rand {
80-
static fn rand(rng: rand::Rng) -> u64 {
81-
rng.gen_u64()
82-
}
83-
}
84-
85-
impl float: Rand {
86-
static fn rand(rng: rand::Rng) -> float {
87-
rng.gen_float()
88-
}
89-
}
90-
91-
impl f32: Rand {
92-
static fn rand(rng: rand::Rng) -> f32 {
93-
rng.gen_f32()
94-
}
95-
}
96-
97-
impl f64: Rand {
98-
static fn rand(rng: rand::Rng) -> f64 {
99-
rng.gen_f64()
100-
}
101-
}
102-
103-
impl char: Rand {
104-
static fn rand(rng: rand::Rng) -> char {
105-
rng.gen_char()
106-
}
107-
}
108-
109-
impl bool: Rand {
110-
static fn rand(rng: rand::Rng) -> bool {
111-
rng.gen_bool()
112-
}
113-
}
114-
115-
impl<T: Rand> Option<T>: Rand {
116-
static fn rand(rng: rand::Rng) -> Option<T> {
117-
if rng.gen_bool() { Some(Rand::rand(rng)) }
118-
else { None }
119-
}
120-
}
121-
12226
#[allow(non_camel_case_types)] // runtime type
12327
enum rctx {}
12428

@@ -145,10 +49,6 @@ pub struct Weighted<T> {
14549

14650
/// Extension methods for random number generators
14751
impl Rng {
148-
/// Return a random value for a Rand type
149-
fn gen<T: Rand>() -> T {
150-
Rand::rand(self)
151-
}
15252

15353
/// Return a random int
15454
fn gen_int() -> int {

trunk/src/librustc/lib/llvm.rs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -445,19 +445,14 @@ pub extern mod llvm {
445445
Count: c_uint,
446446
Packed: Bool) -> ValueRef;
447447

448-
pub unsafe fn LLVMConstString(Str: *c_char,
449-
Length: c_uint,
450-
DontNullTerminate: Bool)
451-
-> ValueRef;
452-
pub unsafe fn LLVMConstArray(ElementTy: TypeRef,
453-
ConstantVals: *ValueRef,
454-
Length: c_uint)
455-
-> ValueRef;
448+
pub unsafe fn LLVMConstString(Str: *c_char, Length: c_uint,
449+
DontNullTerminate: Bool) -> ValueRef;
450+
pub unsafe fn LLVMConstArray(ElementTy: TypeRef, ConstantVals: *ValueRef,
451+
Length: c_uint) -> ValueRef;
456452
pub unsafe fn LLVMConstStruct(ConstantVals: *ValueRef,
457-
Count: c_uint,
458-
Packed: Bool) -> ValueRef;
453+
Count: c_uint, Packed: Bool) -> ValueRef;
459454
pub unsafe fn LLVMConstVector(ScalarConstantVals: *ValueRef,
460-
Size: c_uint) -> ValueRef;
455+
Size: c_uint) -> ValueRef;
461456

462457
/* Constant expressions */
463458
pub unsafe fn LLVMAlignOf(Ty: TypeRef) -> ValueRef;
@@ -468,8 +463,8 @@ pub extern mod llvm {
468463
pub unsafe fn LLVMConstFNeg(ConstantVal: ValueRef) -> ValueRef;
469464
pub unsafe fn LLVMConstNot(ConstantVal: ValueRef) -> ValueRef;
470465
pub unsafe fn LLVMConstAdd(LHSConstant: ValueRef,
471-
RHSConstant: ValueRef)
472-
-> ValueRef;
466+
RHSConstant: ValueRef)
467+
-> ValueRef;
473468
pub unsafe fn LLVMConstNSWAdd(LHSConstant: ValueRef,
474469
RHSConstant: ValueRef)
475470
-> ValueRef;
@@ -480,14 +475,14 @@ pub extern mod llvm {
480475
RHSConstant: ValueRef)
481476
-> ValueRef;
482477
pub unsafe fn LLVMConstSub(LHSConstant: ValueRef,
483-
RHSConstant: ValueRef)
484-
-> ValueRef;
478+
RHSConstant: ValueRef)
479+
-> ValueRef;
485480
pub unsafe fn LLVMConstNSWSub(LHSConstant: ValueRef,
486-
RHSConstant: ValueRef)
487-
-> ValueRef;
481+
RHSConstant: ValueRef)
482+
-> ValueRef;
488483
pub unsafe fn LLVMConstNUWSub(LHSConstant: ValueRef,
489-
RHSConstant: ValueRef)
490-
-> ValueRef;
484+
RHSConstant: ValueRef)
485+
-> ValueRef;
491486
pub unsafe fn LLVMConstFSub(LHSConstant: ValueRef,
492487
RHSConstant: ValueRef)
493488
-> ValueRef;

trunk/src/librustc/middle/trans/_match.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,6 @@ pub fn pick_col(m: &[@Match]) -> uint {
10281028
pub enum branch_kind { no_branch, single, switch, compare, compare_vec_len, }
10291029
10301030
// Compiles a comparison between two things.
1031-
//
1032-
// NB: This must produce an i1, not a Rust bool (i8).
10331031
pub fn compare_values(cx: block,
10341032
lhs: ValueRef,
10351033
rhs: ValueRef,
@@ -1055,11 +1053,7 @@ pub fn compare_values(cx: block,
10551053
scratch_rhs],
10561054
expr::SaveIn(
10571055
scratch_result.val));
1058-
let result = scratch_result.to_result(bcx);
1059-
Result {
1060-
bcx: result.bcx,
1061-
val: bool_to_i1(result.bcx, result.val)
1062-
}
1056+
return scratch_result.to_result(bcx);
10631057
}
10641058
ty::ty_estr(_) => {
10651059
let scratch_result = scratch_datum(cx, ty::mk_bool(cx.tcx()),
@@ -1069,11 +1063,7 @@ pub fn compare_values(cx: block,
10691063
~[lhs, rhs],
10701064
expr::SaveIn(
10711065
scratch_result.val));
1072-
let result = scratch_result.to_result(bcx);
1073-
Result {
1074-
bcx: result.bcx,
1075-
val: bool_to_i1(result.bcx, result.val)
1076-
}
1066+
return scratch_result.to_result(bcx);
10771067
}
10781068
_ => {
10791069
cx.tcx().sess.bug(~"only scalars and strings supported in \
@@ -1186,7 +1176,6 @@ pub fn compile_guard(bcx: block,
11861176
expr::trans_to_datum(bcx, guard_expr).to_result()
11871177
}
11881178
});
1189-
let val = bool_to_i1(bcx, val);
11901179
11911180
// Revoke the temp cleanups now that the guard successfully executed.
11921181
for temp_cleanups.each |llval| {

0 commit comments

Comments
 (0)