Skip to content

Commit d3b978e

Browse files
author
James Miller
committed
---
yaml --- r: 140644 b: refs/heads/try2 c: 050c744 h: refs/heads/master v: v3
1 parent babd7d8 commit d3b978e

Some content is hidden

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

49 files changed

+178
-159
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ce9c0225c451c00c3eebe4e496185143a18814b9
8+
refs/heads/try2: 050c744c23a8e01407452bc64ca63f92554afee2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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 separately but to stdout only
767+
// to stdout and stderr seperately but to stdout only
768768
let mut newargs_out = ~[];
769769
let mut newargs_err = ~[];
770770
let subargs = args.args;

branches/try2/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 receives
55+
* * builder - A function that will construct the vector. It recieves
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 receives
73+
* * builder - A function that will construct the vector. It recieves
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 receives
90+
* * builder - A function that will construct the vector. It recieves
9191
* as an argument a function that will push an element
9292
* onto the vector being constructed.
9393
*/

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ they contained the following prologue:
6060
// Don't link to core. We are core.
6161
#[no_core];
6262

63+
#[warn(vecs_implicitly_copyable)];
6364
#[deny(non_camel_case_types)];
6465
#[allow(deprecated_mutable_fields)];
6566

branches/try2/src/libcore/iter.rs

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

186187
#[test]
187-
fn test_to_vec() {
188+
fn test_iter_to_vec() {
188189
let xs = ~[1, 2, 3];
189-
let ys = do to_vec |f| { xs.each(|x| f(*x)) };
190+
let ys = do iter_to_vec |f| { xs.each(|x| f(*x)) };
190191
assert_eq!(xs, ys);
191192
}
192193

branches/try2/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::to_vec(|f| it.advance(f));
381+
let xs = iter::iter_to_vec(|f| it.advance(f));
382382
assert_eq!(xs, ~[0, 5, 10, 15, 20, 25, 30, 35, 40, 45]);
383383
}
384384

branches/try2/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 separately
14+
// XXX: Iteration should probably be considered seperately
1515

1616
pub trait ReaderUtil {
1717

branches/try2/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 reinterpret_cast -- transmute would leak (forget) the closure.
136+
// Use reintepret_cast -- transmute would leak (forget) the closure.
137137
let pair: (*libc::c_void, *libc::c_void) = cast::transmute_copy(&key);
138138
pair.first()
139139
}

branches/try2/src/libcore/unstable/intrinsics.rs

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

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

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

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

branches/try2/src/libcore/vec.rs

Lines changed: 1 addition & 1 deletion
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 receives
222+
* * builder - A function that will construct the vector. It recieves
223223
* as an argument a function that will push an element
224224
* onto the vector being constructed.
225225
*/

branches/try2/src/librustc/driver/session.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ pub impl Session_ {
237237
msg: &str) {
238238
let level = lint::get_lint_settings_level(
239239
self.lint_settings, lint_mode, expr_id, item_id);
240-
let msg = fmt!("%s [-W %s]", msg, lint::get_lint_name(lint_mode));
241240
self.span_lint_level(level, span, msg);
242241
}
243242
fn next_node_id(@self) -> ast::node_id {

branches/try2/src/librustc/middle/lint.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,6 @@ pub fn get_lint_dict() -> LintDict {
237237
return @map;
238238
}
239239

240-
pub fn get_lint_name(lint_mode: lint) -> ~str {
241-
for lint_table.each |&(name, spec)| {
242-
if spec.lint == lint_mode {
243-
return name.to_str();
244-
}
245-
}
246-
fail!();
247-
}
248240
// This is a highly not-optimal set of data structure decisions.
249241
type LintModes = @mut SmallIntMap<level>;
250242
type LintModeMap = @mut HashMap<ast::node_id, LintModes>;

branches/try2/src/librustc/middle/trans/foreign.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,9 @@ 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+
}
718721
~"forget" => {}
719722
~"transmute" => {
720723
let (in_type, out_type) = (substs.tys[0], substs.tys[1]);

branches/try2/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 preferred alignment may be larger than the alignment used when
90+
// The preffered 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 platform.
99+
// Returns the minimum alignment of a type required by the plattform.
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 {

branches/try2/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-
~"init" | ~"transmute" | ~"move_val" |
121+
~"uninit" | ~"init" | ~"transmute" | ~"move_val" |
122122
~"move_val_init" => use_repr,
123123

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

branches/try2/src/librustc/middle/typeck/check/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3447,6 +3447,7 @@ 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)),
34503451
~"forget" => (1u, ~[arg(param(ccx, 0u))], ty::mk_nil()),
34513452
~"transmute" => (2, ~[ arg(param(ccx, 0)) ], param(ccx, 1)),
34523453
~"move_val" | ~"move_val_init" => {

branches/try2/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-
// substituted in and figures out which vtable is used. There is some
34+
// subsituted 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

branches/try2/src/libstd/arc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ mod tests {
498498

499499
let arc_v = p.recv();
500500

501-
let v = copy *arc::get::<~[int]>(&arc_v);
501+
let v = *arc::get::<~[int]>(&arc_v);
502502
assert!(v[3] == 4);
503503
};
504504

branches/try2/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 uninitialized objects, but
23+
// is important to not run the destructor on uninitalized 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

branches/try2/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 receive serializable types over I/O
18+
particularly be used to send and recieve 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 receives byte vectors,
58+
A FlatPort, consisting of a `BytePort` that recieves 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-
// Receiver task
824+
// Reciever 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!("received %?", j);
843+
debug!("receieved %?", j);
844844
assert!(i == j);
845845
}
846846

branches/try2/src/libstd/future.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ mod test {
238238
239239
#[test]
240240
fn test_sendable_future() {
241-
let expected = "schlorf";
242-
let f = Cell(do spawn { expected });
241+
let expected = ~"schlorf";
242+
let f = Cell(do spawn { copy expected });
243243
do task::spawn {
244244
let mut f = f.take();
245245
let actual = f.get();

0 commit comments

Comments
 (0)