Skip to content

Commit 1316a9e

Browse files
committed
---
yaml --- r: 85920 b: refs/heads/dist-snap c: 26e925a h: refs/heads/master v: v3
1 parent 633d71f commit 1316a9e

File tree

28 files changed

+587
-690
lines changed

28 files changed

+587
-690
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 188a9dd210e5cbc1db6a31992dc298d143d80526
9+
refs/heads/dist-snap: 26e925a1f01f830f6ca1ff377461a6fab30dc9e6
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/tutorial-tasks.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,6 @@ do spawn {
113113
}
114114
~~~
115115

116-
By default, the scheduler multiplexes tasks across the available cores, running
117-
in parallel. Thus, on a multicore machine, running the following code
118-
should interleave the output in vaguely random order.
119-
120-
~~~
121-
# use std::io::print;
122-
# use std::task::spawn;
123-
124-
for child_task_number in range(0, 20) {
125-
do spawn {
126-
print(fmt!("I am child number %d\n", child_task_number));
127-
}
128-
}
129-
~~~
130-
131116
## Communication
132117

133118
Now that we have spawned a new task, it would be nice if we could

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:spac
3333
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
3434

3535
" reserved
36-
syn keyword rustKeyword be
36+
syn keyword rustKeyword be yield typeof
3737

3838
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
3939
syn keyword rustType f64 i8 i16 i32 i64 str Self

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,20 +2366,12 @@ pub fn create_entry_wrapper(ccx: @mut CrateContext,
23662366
&ccx.int_type);
23672367

23682368
// FIXME #4404 android JNI hacks
2369-
let llfn = if *ccx.sess.building_library {
2370-
decl_cdecl_fn(ccx.llmod, "amain", llfty)
2369+
let main_name = if *ccx.sess.building_library {
2370+
"amain"
23712371
} else {
2372-
let main_name = match ccx.sess.targ_cfg.os {
2373-
session::os_win32 => {
2374-
match ccx.sess.targ_cfg.arch {
2375-
X86 => ~"WinMain@16",
2376-
_ => ~"WinMain",
2377-
}
2378-
},
2379-
_ => ~"main",
2380-
};
2381-
decl_cdecl_fn(ccx.llmod, main_name, llfty)
2372+
"main"
23822373
};
2374+
let llfn = decl_cdecl_fn(ccx.llmod, main_name, llfty);
23832375
let llbb = do "top".with_c_str |buf| {
23842376
unsafe {
23852377
llvm::LLVMAppendBasicBlockInContext(ccx.llcx, llfn, buf)

branches/dist-snap/src/librustc/middle/trans/type_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn type_uses_for(ccx: @mut CrateContext, fn_id: def_id, n_tps: uint)
149149
"visit_tydesc" | "forget" | "frame_address" |
150150
"morestack_addr" => 0,
151151

152-
"offset" | "offset_inbounds" |
152+
"offset" |
153153
"memcpy32" | "memcpy64" | "memmove32" | "memmove64" |
154154
"memset32" | "memset64" => use_repr,
155155

branches/dist-snap/src/librustc/middle/typeck/astconv.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,9 @@ pub fn ast_ty_to_ty<AC:AstConv, RS:region_scope + Clone + 'static>(
517517
}
518518
}
519519
}
520+
ast::ty_typeof(_e) => {
521+
tcx.sess.span_bug(ast_ty.span, "typeof is reserved but unimplemented");
522+
}
520523
ast::ty_infer => {
521524
// ty_infer should only appear as the type of arguments or return
522525
// values in a fn_expr, or as the type of local variables. Both of

branches/dist-snap/src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,20 +3663,6 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {
36633663
mutbl: ast::m_imm
36643664
}))
36653665
}
3666-
"offset_inbounds" => {
3667-
(1,
3668-
~[
3669-
ty::mk_ptr(tcx, ty::mt {
3670-
ty: param(ccx, 0),
3671-
mutbl: ast::m_imm
3672-
}),
3673-
ty::mk_int()
3674-
],
3675-
ty::mk_ptr(tcx, ty::mt {
3676-
ty: param(ccx, 0),
3677-
mutbl: ast::m_imm
3678-
}))
3679-
}
36803666
"memcpy32" => {
36813667
(1,
36823668
~[

branches/dist-snap/src/libstd/c_str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl<'self> ToCStr for &'self [u8] {
179179
do cs.with_mut_ref |buf| {
180180
for i in range(0, self.len()) {
181181
unsafe {
182-
let p = buf.offset_inbounds(i as int);
182+
let p = buf.offset(i as int);
183183
if *p == 0 {
184184
match null_byte::cond.raise(self.to_owned()) {
185185
Truncate => break,
@@ -222,7 +222,7 @@ impl<'self> Iterator<libc::c_char> for CStringIterator<'self> {
222222
if ch == 0 {
223223
None
224224
} else {
225-
self.ptr = ptr::offset(self.ptr, 1);
225+
self.ptr = unsafe { ptr::offset(self.ptr, 1) };
226226
Some(ch)
227227
}
228228
}

0 commit comments

Comments
 (0)