Skip to content

Commit c8f7b2d

Browse files
committed
---
yaml --- r: 60149 b: refs/heads/master c: ca95e7f h: refs/heads/master i: 60147: 8e2d79a v: v3
1 parent cf85890 commit c8f7b2d

38 files changed

+57
-79
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: f5ab112e6b083ab20fdcf9e2fff7dde4a85940b0
2+
refs/heads/master: ca95e7f94ed7b9f793a061bd0a7cc4d74de6b10d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2d28d645422c1617be58c8ca7ad9a457264ca850
55
refs/heads/try: c50a9d5b664478e533ba1d1d353213d70c8ad589

trunk/src/compiletest/runtest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ fn _arm_exec_compiled_test(config: config, props: TestProps,
764764
logv(config, fmt!("executing (%s) %s", config.target, cmdline));
765765
766766
// adb shell dose not forward stdout and stderr of internal result
767-
// to stdout and stderr seperately but to stdout only
767+
// to stdout and stderr separately but to stdout only
768768
let mut newargs_out = ~[];
769769
let mut newargs_err = ~[];
770770
let subargs = args.args;

trunk/src/libcore/at_vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub fn capacity<T>(v: @[T]) -> uint {
5252
* # Arguments
5353
*
5454
* * size - An initial size of the vector to reserve
55-
* * builder - A function that will construct the vector. It recieves
55+
* * builder - A function that will construct the vector. It receives
5656
* as an argument a function that will push an element
5757
* onto the vector being constructed.
5858
*/
@@ -70,7 +70,7 @@ pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] {
7070
*
7171
* # Arguments
7272
*
73-
* * builder - A function that will construct the vector. It recieves
73+
* * builder - A function that will construct the vector. It receives
7474
* as an argument a function that will push an element
7575
* onto the vector being constructed.
7676
*/
@@ -87,7 +87,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> @[A] {
8787
* # Arguments
8888
*
8989
* * size - An option, maybe containing initial size of the vector to reserve
90-
* * builder - A function that will construct the vector. It recieves
90+
* * builder - A function that will construct the vector. It receives
9191
* as an argument a function that will push an element
9292
* onto the vector being constructed.
9393
*/

trunk/src/libcore/cast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub mod rusti {
2525

2626
/// Casts the value at `src` to U. The two types must have the same length.
2727
pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
28-
let mut dest: U = unstable::intrinsics::uninit();
28+
let mut dest: U = unstable::intrinsics::init();
2929
{
3030
let dest_ptr: *mut u8 = rusti::transmute(&mut dest);
3131
let src_ptr: *u8 = rusti::transmute(src);

trunk/src/libcore/iter.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ breaking out of iteration. The adaptors in the module work with any such iterato
1717
tied to specific traits. For example:
1818
1919
~~~~
20-
use core::iter::iter_to_vec;
21-
println(iter_to_vec(|f| uint::range(0, 20, f)).to_str());
20+
println(iter::to_vec(|f| uint::range(0, 20, f)).to_str());
2221
~~~~
2322
2423
An external iterator object implementing the interface in the `iterator` module can be used as an
@@ -55,12 +54,12 @@ pub trait Times {
5554
*
5655
* ~~~
5756
* let xs = ~[1, 2, 3];
58-
* let ys = do iter_to_vec |f| { xs.each(|x| f(*x)) };
57+
* let ys = do iter::to_vec |f| { xs.each(|x| f(*x)) };
5958
* assert_eq!(xs, ys);
6059
* ~~~
6160
*/
6261
#[inline(always)]
63-
pub fn iter_to_vec<T>(iter: &fn(f: &fn(T) -> bool)) -> ~[T] {
62+
pub fn to_vec<T>(iter: &fn(f: &fn(T) -> bool)) -> ~[T] {
6463
let mut v = ~[];
6564
for iter |x| { v.push(x) }
6665
v
@@ -185,9 +184,9 @@ mod tests {
185184
use prelude::*;
186185

187186
#[test]
188-
fn test_iter_to_vec() {
187+
fn test_to_vec() {
189188
let xs = ~[1, 2, 3];
190-
let ys = do iter_to_vec |f| { xs.each(|x| f(*x)) };
189+
let ys = do to_vec |f| { xs.each(|x| f(*x)) };
191190
assert_eq!(xs, ys);
192191
}
193192

trunk/src/libcore/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ mod tests {
378378
#[test]
379379
fn test_counter_to_vec() {
380380
let mut it = Counter::new(0, 5).take(10);
381-
let xs = iter::iter_to_vec(|f| it.advance(f));
381+
let xs = iter::to_vec(|f| it.advance(f));
382382
assert_eq!(xs, ~[0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
383383
}
384384

trunk/src/libcore/rt/io/extensions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Utility mixins that apply to all Readers and Writers
1212
1313
// XXX: Not sure how this should be structured
14-
// XXX: Iteration should probably be considered seperately
14+
// XXX: Iteration should probably be considered separately
1515

1616
pub trait ReaderUtil {
1717

trunk/src/libcore/task/local_data_priv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ unsafe fn get_newsched_local_map(local: *mut LocalStorage) -> TaskLocalMap {
133133

134134
unsafe fn key_to_key_value<T: 'static>(key: LocalDataKey<T>) -> *libc::c_void {
135135
// Keys are closures, which are (fnptr,envptr) pairs. Use fnptr.
136-
// Use reintepret_cast -- transmute would leak (forget) the closure.
136+
// Use reinterpret_cast -- transmute would leak (forget) the closure.
137137
let pair: (*libc::c_void, *libc::c_void) = cast::transmute_copy(&key);
138138
pair.first()
139139
}

trunk/src/libcore/unstable/intrinsics.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ pub extern "rust-intrinsic" {
4444

4545
pub fn init<T>() -> T;
4646

47-
#[cfg(not(stage0))]
48-
pub unsafe fn uninit<T>() -> T;
49-
5047
pub fn forget<T>(_: T) -> ();
5148

5249
pub fn needs_drop<T>() -> bool;

trunk/src/libcore/vec.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pub fn build<A>(builder: &fn(push: &fn(v: A))) -> ~[A] {
219219
* # Arguments
220220
*
221221
* * size - An option, maybe containing initial size of the vector to reserve
222-
* * builder - A function that will construct the vector. It recieves
222+
* * builder - A function that will construct the vector. It receives
223223
* as an argument a function that will push an element
224224
* onto the vector being constructed.
225225
*/
@@ -591,7 +591,8 @@ pub fn pop<T>(v: &mut ~[T]) -> T {
591591
}
592592
let valptr = ptr::to_mut_unsafe_ptr(&mut v[ln - 1u]);
593593
unsafe {
594-
let mut val = intrinsics::uninit();
594+
// FIXME #4204: Should be uninit() - we don't need this zeroed
595+
let mut val = intrinsics::init();
595596
val <-> *valptr;
596597
raw::set_len(v, ln - 1u);
597598
val
@@ -665,7 +666,8 @@ pub fn push_all_move<T>(v: &mut ~[T], mut rhs: ~[T]) {
665666
unsafe {
666667
do as_mut_buf(rhs) |p, len| {
667668
for uint::range(0, len) |i| {
668-
let mut x = intrinsics::uninit();
669+
// FIXME #4204 Should be uninit() - don't need to zero
670+
let mut x = intrinsics::init();
669671
x <-> *ptr::mut_offset(p, i);
670672
push(&mut *v, x);
671673
}
@@ -681,7 +683,8 @@ pub fn truncate<T>(v: &mut ~[T], newlen: uint) {
681683
unsafe {
682684
// This loop is optimized out for non-drop types.
683685
for uint::range(newlen, oldlen) |i| {
684-
let mut dropped = intrinsics::uninit();
686+
// FIXME #4204 Should be uninit() - don't need to zero
687+
let mut dropped = intrinsics::init();
685688
dropped <-> *ptr::mut_offset(p, i);
686689
}
687690
}
@@ -706,7 +709,9 @@ pub fn dedup<T:Eq>(v: &mut ~[T]) {
706709
// last_written < next_to_read < ln
707710
if *ptr::mut_offset(p, next_to_read) ==
708711
*ptr::mut_offset(p, last_written) {
709-
let mut dropped = intrinsics::uninit();
712+
// FIXME #4204 Should be uninit() - don't need to
713+
// zero
714+
let mut dropped = intrinsics::init();
710715
dropped <-> *ptr::mut_offset(p, next_to_read);
711716
} else {
712717
last_written += 1;

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,9 +715,6 @@ pub fn trans_intrinsic(ccx: @CrateContext,
715715
Store(bcx, C_null(lltp_ty), fcx.llretptr.get());
716716
}
717717
}
718-
~"uninit" => {
719-
// Do nothing, this is effectively a no-op
720-
}
721718
~"forget" => {}
722719
~"transmute" => {
723720
let (in_type, out_type) = (substs.tys[0], substs.tys[1]);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub fn nonzero_llsize_of(cx: @CrateContext, t: TypeRef) -> ValueRef {
8787
}
8888

8989
// Returns the preferred alignment of the given type for the current target.
90-
// The preffered alignment may be larger than the alignment used when
90+
// The preferred alignment may be larger than the alignment used when
9191
// packing the type into structs. This will be used for things like
9292
// allocations inside a stack frame, which LLVM has a free hand in.
9393
pub fn llalign_of_pref(cx: @CrateContext, t: TypeRef) -> uint {
@@ -96,7 +96,7 @@ pub fn llalign_of_pref(cx: @CrateContext, t: TypeRef) -> uint {
9696
}
9797
}
9898

99-
// Returns the minimum alignment of a type required by the plattform.
99+
// Returns the minimum alignment of a type required by the platform.
100100
// This is the alignment that will be used for struct fields, arrays,
101101
// and similar ABI-mandated things.
102102
pub fn llalign_of_min(cx: @CrateContext, t: TypeRef) -> uint {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub fn type_uses_for(ccx: @CrateContext, fn_id: def_id, n_tps: uint)
118118
if abi.is_intrinsic() {
119119
let flags = match *cx.ccx.sess.str_of(i.ident) {
120120
~"size_of" | ~"pref_align_of" | ~"min_align_of" |
121-
~"uninit" | ~"init" | ~"transmute" | ~"move_val" |
121+
~"init" | ~"transmute" | ~"move_val" |
122122
~"move_val_init" => use_repr,
123123

124124
~"get_tydesc" | ~"needs_drop" => use_tydesc,

trunk/src/librustc/middle/typeck/check/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3447,7 +3447,6 @@ pub fn check_intrinsic_type(ccx: @mut CrateCtxt, it: @ast::foreign_item) {
34473447
~"size_of" |
34483448
~"pref_align_of" | ~"min_align_of" => (1u, ~[], ty::mk_uint()),
34493449
~"init" => (1u, ~[], param(ccx, 0u)),
3450-
~"uninit" => (1u, ~[], param(ccx, 0u)),
34513450
~"forget" => (1u, ~[arg(param(ccx, 0u))], ty::mk_nil()),
34523451
~"transmute" => (2, ~[ arg(param(ccx, 0)) ], param(ccx, 1)),
34533452
~"move_val" | ~"move_val_init" => {

trunk/src/librustc/middle/typeck/check/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use syntax::print::pprust::expr_to_str;
3131
use syntax::visit;
3232

3333
// vtable resolution looks for places where trait bounds are
34-
// subsituted in and figures out which vtable is used. There is some
34+
// substituted in and figures out which vtable is used. There is some
3535
// extra complication thrown in to support early "opportunistic"
3636
// vtable resolution. This is a hacky mechanism that is invoked while
3737
// typechecking function calls (after typechecking non-closure

trunk/src/libstd/arena.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// calling the destructors on them.
2121
// One subtle point that needs to be addressed is how to handle
2222
// failures while running the user provided initializer function. It
23-
// is important to not run the destructor on uninitalized objects, but
23+
// is important to not run the destructor on uninitialized objects, but
2424
// how to detect them is somewhat subtle. Since alloc() can be invoked
2525
// recursively, it is not sufficient to simply exclude the most recent
2626
// object. To solve this without requiring extra space, we use the low

trunk/src/libstd/flatpipes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ or transformed to and from, byte vectors.
1515
1616
The `FlatPort` and `FlatChan` types implement the generic channel and
1717
port interface for arbitrary types and transport strategies. It can
18-
particularly be used to send and recieve serializable types over I/O
18+
particularly be used to send and receive serializable types over I/O
1919
streams.
2020
2121
`FlatPort` and `FlatChan` implement the same comm traits as pipe-based
@@ -55,7 +55,7 @@ use core::sys::size_of;
5555
use core::vec;
5656

5757
/**
58-
A FlatPort, consisting of a `BytePort` that recieves byte vectors,
58+
A FlatPort, consisting of a `BytePort` that receives byte vectors,
5959
and an `Unflattener` that converts the bytes to a value.
6060
6161
Create using the constructors in the `serial` and `pod` modules.
@@ -821,7 +821,7 @@ mod test {
821821
}
822822
}
823823
824-
// Reciever task
824+
// Receiver task
825825
do task::spawn || {
826826
// Wait for a connection
827827
let (conn, res_chan) = accept_port.recv();
@@ -840,7 +840,7 @@ mod test {
840840
841841
for int::range(0, 10) |i| {
842842
let j = port.recv();
843-
debug!("receieved %?", j);
843+
debug!("received %?", j);
844844
assert!(i == j);
845845
}
846846

trunk/src/libstd/getopts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ pub mod groups {
623623
desc_sep
624624
};
625625
626-
// Normalize desc to contain words seperated by one space character
626+
// Normalize desc to contain words separated by one space character
627627
let mut desc_normalized_whitespace = ~"";
628628
for str::each_word(desc) |word| {
629629
desc_normalized_whitespace.push_str(word);

trunk/src/libstd/net_ip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ mod test {
420420
if result::is_err(&ga_result) {
421421
fail!(~"got err result from net::ip::get_addr();")
422422
}
423-
// note really sure how to realiably test/assert
423+
// note really sure how to reliably test/assert
424424
// this.. mostly just wanting to see it work, atm.
425425
let results = result::unwrap(ga_result);
426426
debug!("test_get_addr: Number of results for %s: %?",

trunk/src/libstd/priority_queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub impl <T:Ord> PriorityQueue<T> {
139139
while pos > start {
140140
let parent = (pos - 1) >> 1;
141141
if new > self.data[parent] {
142-
let mut x = rusti::uninit();
142+
let mut x = rusti::init();
143143
x <-> self.data[parent];
144144
rusti::move_val_init(&mut self.data[pos], x);
145145
pos = parent;
@@ -162,7 +162,7 @@ pub impl <T:Ord> PriorityQueue<T> {
162162
if right < end && !(self.data[child] > self.data[right]) {
163163
child = right;
164164
}
165-
let mut x = rusti::uninit();
165+
let mut x = rusti::init();
166166
x <-> self.data[child];
167167
rusti::move_val_init(&mut self.data[pos], x);
168168
pos = child;

trunk/src/libstd/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<T: Owned> Drop for Rc<T> {
5151
unsafe {
5252
(*self.ptr).count -= 1;
5353
if (*self.ptr).count == 0 {
54-
let mut x = intrinsics::uninit();
54+
let mut x = intrinsics::init();
5555
x <-> *self.ptr;
5656
free(self.ptr as *c_void)
5757
}
@@ -159,7 +159,7 @@ impl<T: Owned> Drop for RcMut<T> {
159159
unsafe {
160160
(*self.ptr).count -= 1;
161161
if (*self.ptr).count == 0 {
162-
let mut x = rusti::uninit();
162+
let mut x = rusti::init();
163163
x <-> *self.ptr;
164164
free(self.ptr as *c_void)
165165
}

trunk/src/libstd/rope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ pub mod node {
565565
*
566566
* # Fields
567567
*
568-
* * byte_offset = The number of bytes skippen in `content`
568+
* * byte_offset = The number of bytes skipped in `content`
569569
* * byte_len - The number of bytes of `content` to use
570570
* * char_len - The number of chars in the leaf.
571571
* * content - Contents of the leaf.

trunk/src/libstd/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub mod rustrt {
3232
}
3333

3434
// The name of a test. By convention this follows the rules for rust
35-
// paths; i.e. it should be a series of identifiers seperated by double
35+
// paths; i.e. it should be a series of identifiers separated by double
3636
// colons. This way if some test runner wants to arrange the tests
3737
// hierarchically it may.
3838

trunk/src/libstd/uv_global_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,6 @@ mod test {
227227
exit_po.recv();
228228
};
229229
debug!(~"test_stress_gl_uv_global_loop_high_level_global_timer"+
230-
~" exiting sucessfully!");
230+
~" exiting successfully!");
231231
}
232232
}

trunk/src/libstd/uv_iotask.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fn impl_uv_iotask_async(iotask: &IoTask) {
243243
exit_po.recv();
244244
}
245245

246-
// this fn documents the bear minimum neccesary to roll your own
246+
// this fn documents the bear minimum necessary to roll your own
247247
// high_level_loop
248248
#[cfg(test)]
249249
fn spawn_test_loop(exit_ch: ~Chan<()>) -> IoTask {

trunk/src/libstd/uv_ll.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ pub struct sockaddr_in {
269269
}
270270

271271
// unix size: 28 .. FIXME #1645
272-
// stuck with 32 becuse of rust padding structs?
272+
// stuck with 32 because of rust padding structs?
273273
#[cfg(target_arch="x86_64")]
274274
pub struct sockaddr_in6 {
275275
a0: *u8, a1: *u8,
@@ -286,7 +286,7 @@ pub struct sockaddr_in6 {
286286
}
287287

288288
// unix size: 28 .. FIXME #1645
289-
// stuck with 32 becuse of rust padding structs?
289+
// stuck with 32 because of rust padding structs?
290290
pub type addr_in = addr_in_impl::addr_in;
291291
#[cfg(unix)]
292292
pub mod addr_in_impl {
@@ -1377,7 +1377,7 @@ mod test {
13771377
let tcp_init_result = tcp_init(test_loop as *libc::c_void,
13781378
tcp_handle_ptr);
13791379
if (tcp_init_result == 0) {
1380-
debug!(~"sucessful tcp_init_result");
1380+
debug!(~"successful tcp_init_result");
13811381
13821382
debug!(~"building addr...");
13831383
let addr = ip4_addr(ip, port);

trunk/src/libsyntax/ext/quote.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ fn expand_tts(cx: @ext_ctxt,
697697
// compiler (which we don't really want to do) and, in any case, only
698698
// pushed the problem a very small step further back: an error
699699
// resulting from a parse of the resulting quote is still attributed to
700-
// the site the string literal occured, which was in a source file
700+
// the site the string literal occurred, which was in a source file
701701
// _other_ than the one the user has control over. For example, an
702702
// error in a quote from the protocol compiler, invoked in user code
703703
// using proto! for example, will be attributed to the pipec.rs file in

0 commit comments

Comments
 (0)