Skip to content

Commit d299f1d

Browse files
committed
---
yaml --- r: 140648 b: refs/heads/try2 c: 7675856 h: refs/heads/master v: v3
1 parent 15e157e commit d299f1d

Some content is hidden

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

44 files changed

+158
-151
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: 414970c46f75c730d7fed029deb48b0d1c454391
8+
refs/heads/try2: 76758562539ef3c439dd28ad53636f6b70382e7b
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 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;

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 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
*/

branches/try2/src/libcore/core.rc

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

63-
#[warn(vecs_implicitly_copyable)];
6463
#[deny(non_camel_case_types)];
6564
#[allow(deprecated_mutable_fields)];
6665

branches/try2/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

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::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

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

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 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
*/

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ 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));
240241
self.span_lint_level(level, span, msg);
241242
}
242243
fn next_node_id(@self) -> ast::node_id {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,14 @@ 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+
}
240248
// This is a highly not-optimal set of data structure decisions.
241249
type LintModes = @mut SmallIntMap<level>;
242250
type LintModeMap = @mut HashMap<ast::node_id, LintModes>;

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 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 {

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-
// 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

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 = *arc::get::<~[int]>(&arc_v);
501+
let v = copy *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 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

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 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

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 { copy expected });
241+
let expected = "schlorf";
242+
let f = Cell(do spawn { expected });
243243
do task::spawn {
244244
let mut f = f.take();
245245
let actual = f.get();

0 commit comments

Comments
 (0)