Skip to content

Commit 1ca718f

Browse files
committed
---
yaml --- r: 179389 b: refs/heads/tmp c: d4a66e9 h: refs/heads/master i: 179387: 3e380ca v: v3
1 parent 5f5c593 commit 1ca718f

File tree

275 files changed

+3650
-2772
lines changed

Some content is hidden

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

275 files changed

+3650
-2772
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 93edb7c17bd4d2d56b0f1f510de5f820cf61bb5f
37+
refs/heads/tmp: d4a66e9b098e3c322161f0397e932cf6d3c1b15c

branches/tmp/src/compiletest/compiletest.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118118
}
119119

120120
fn opt_path(m: &getopts::Matches, nm: &str) -> Path {
121-
Path::new(m.opt_str(nm).unwrap())
121+
match m.opt_str(nm) {
122+
Some(s) => Path::new(s),
123+
None => panic!("no option (=path) found for {}", nm),
124+
}
122125
}
123126

124127
let filter = if !matches.free.is_empty() {

branches/tmp/src/doc/reference.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ cases mentioned in [Number literals](#number-literals) below.
256256

257257
| [Number literals](#number-literals)`*` | Example | Exponentiation | Suffixes |
258258
|----------------------------------------|---------|----------------|----------|
259-
| Decimal integer | `98_222is` | `N/A` | Integer suffixes |
260-
| Hex integer | `0xffis` | `N/A` | Integer suffixes |
261-
| Octal integer | `0o77is` | `N/A` | Integer suffixes |
262-
| Binary integer | `0b1111_0000is` | `N/A` | Integer suffixes |
263-
| Floating-point | `123.0E+77f64` | `Optional` | Floating-point suffixes |
259+
| Decimal integer | `98_222` | `N/A` | Integer suffixes |
260+
| Hex integer | `0xff` | `N/A` | Integer suffixes |
261+
| Octal integer | `0o77` | `N/A` | Integer suffixes |
262+
| Binary integer | `0b1111_0000` | `N/A` | Integer suffixes |
263+
| Floating-point | `123.0E+77` | `Optional` | Floating-point suffixes |
264264

265265
`*` All number literals allow `_` as a visual separator: `1_234.0E+18f64`
266266

@@ -1813,7 +1813,6 @@ default visibility with the `priv` keyword. When an item is declared as `pub`,
18131813
it can be thought of as being accessible to the outside world. For example:
18141814

18151815
```
1816-
# #![allow(missing_copy_implementations)]
18171816
# fn main() {}
18181817
// Declare a private struct
18191818
struct Foo;
@@ -2468,6 +2467,12 @@ The currently implemented features of the reference compiler are:
24682467

24692468
* `associated_types` - Allows type aliases in traits. Experimental.
24702469

2470+
* `no_std` - Allows the `#![no_std]` crate attribute, which disables the implicit
2471+
`extern crate std`. This typically requires use of the unstable APIs
2472+
behind the libstd "facade", such as libcore and libcollections. It
2473+
may also cause problems when using syntax extensions, including
2474+
`#[derive]`.
2475+
24712476
If a feature is promoted to a language feature, then all existing programs will
24722477
start to receive compilation warnings about #[feature] directives which enabled
24732478
the new feature (because the directive is no longer necessary). However, if a

branches/tmp/src/doc/trpl/ownership.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
523523
fn debug(lvl: u32, s: &str); // elided
524524
fn debug<'a>(lvl: u32, s: &'a str); // expanded
525525
526-
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
526+
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
527527
// reference (`&`). Only things relating to references (such as a `struct`
528528
// which contains a reference) need lifetimes.
529529

branches/tmp/src/doc/trpl/unsafe.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ attribute attached to the crate.
433433
```ignore
434434
// a minimal library
435435
#![crate_type="lib"]
436+
#![feature(no_std)]
436437
#![no_std]
437438
# // fn main() {} tricked you, rustdoc!
438439
```
@@ -446,8 +447,8 @@ The function marked `#[start]` is passed the command line parameters
446447
in the same format as C:
447448

448449
```
450+
#![feature(lang_items, start, no_std)]
449451
#![no_std]
450-
#![feature(lang_items, start)]
451452
452453
// Pull in the system libc library for what crt0.o likely requires
453454
extern crate libc;
@@ -473,6 +474,7 @@ correct ABI and the correct name, which requires overriding the
473474
compiler's name mangling too:
474475

475476
```ignore
477+
#![feature(no_std)]
476478
#![no_std]
477479
#![no_main]
478480
#![feature(lang_items, start)]
@@ -528,8 +530,8 @@ As an example, here is a program that will calculate the dot product of two
528530
vectors provided from C, using idiomatic Rust practices.
529531

530532
```
533+
#![feature(lang_items, start, no_std)]
531534
#![no_std]
532-
#![feature(lang_items, start)]
533535
534536
# extern crate libc;
535537
extern crate core;
@@ -576,10 +578,6 @@ extern fn panic_fmt(args: &core::fmt::Arguments,
576578
#[lang = "eh_personality"] extern fn eh_personality() {}
577579
# #[start] fn start(argc: isize, argv: *const *const u8) -> isize { 0 }
578580
# fn main() {}
579-
# mod std { // for-loops
580-
# pub use core::iter;
581-
# pub use core::option;
582-
# }
583581
```
584582

585583
Note that there is one extra lang item here which differs from the examples
@@ -656,8 +654,8 @@ and one for deallocation. A freestanding program that uses the `Box`
656654
sugar for dynamic allocations via `malloc` and `free`:
657655

658656
```
657+
#![feature(lang_items, box_syntax, start, no_std)]
659658
#![no_std]
660-
#![feature(lang_items, box_syntax, start)]
661659
662660
extern crate libc;
663661

branches/tmp/src/etc/featureck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@
194194
if not name in joint_features:
195195
print "error: feature '" + name + "' is both a lang and lib feature but not whitelisted"
196196
errors = True
197-
lang_status = lang_feature_stats[name][3]
197+
lang_status = language_feature_stats[name][3]
198198
lib_status = lib_feature_stats[name][3]
199-
lang_stable_since = lang_feature_stats[name][4]
199+
lang_stable_since = language_feature_stats[name][4]
200200
lib_stable_since = lib_feature_stats[name][4]
201201

202202
if lang_status != lib_status and lib_status != "deprecated":

branches/tmp/src/grammar/parser-lalr.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ maybe_stmts
11951195
//
11961196
// There are also two other expr subtypes: first, nonparen_expr
11971197
// disallows exprs surrounded by parens (including tuple expressions),
1198-
// this is neccesary for BOX (place) expressions, so a parens expr
1198+
// this is necessary for BOX (place) expressions, so a parens expr
11991199
// following the BOX is always parsed as the place. There is also
12001200
// expr_norange used in index_expr, which disallows '..' in
12011201
// expressions as that has special meaning inside of brackets.

branches/tmp/src/liballoc/arc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
311311
///
312312
/// // stuff
313313
///
314-
/// drop(five); // explict drop
314+
/// drop(five); // explicit drop
315315
/// }
316316
/// {
317317
/// let five = Arc::new(5);
@@ -441,7 +441,7 @@ impl<T: Sync + Send> Drop for Weak<T> {
441441
///
442442
/// // stuff
443443
///
444-
/// drop(weak_five); // explict drop
444+
/// drop(weak_five); // explicit drop
445445
/// }
446446
/// {
447447
/// let five = Arc::new(5);

branches/tmp/src/liballoc/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
6666
html_root_url = "http://doc.rust-lang.org/nightly/")]
6767

68+
#![feature(no_std)]
6869
#![no_std]
6970
#![feature(lang_items, unsafe_destructor)]
7071
#![feature(box_syntax)]
@@ -73,7 +74,9 @@
7374
#![feature(unboxed_closures)]
7475
#![feature(core)]
7576
#![feature(hash)]
76-
#![feature(libc)]
77+
#![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
78+
feature(libc))]
79+
7780

7881
#[macro_use]
7982
extern crate core;
@@ -124,7 +127,8 @@ pub fn oom() -> ! {
124127
#[doc(hidden)]
125128
pub fn fixme_14344_be_sure_to_link_to_collections() {}
126129

127-
#[cfg(not(test))]
130+
// NOTE: remove after next snapshot
131+
#[cfg(all(stage0, not(test)))]
128132
#[doc(hidden)]
129133
mod std {
130134
pub use core::fmt;

branches/tmp/src/liballoc/rc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ struct RcBox<T> {
172172

173173
/// An immutable reference-counted pointer type.
174174
///
175-
/// See the [module level documentation](../index.html) for more details.
175+
/// See the [module level documentation](./index.html) for more details.
176176
#[unsafe_no_drop_flag]
177177
#[stable(feature = "rust1", since = "1.0.0")]
178178
pub struct Rc<T> {
@@ -383,7 +383,7 @@ impl<T> Drop for Rc<T> {
383383
///
384384
/// // stuff
385385
///
386-
/// drop(five); // explict drop
386+
/// drop(five); // explicit drop
387387
/// }
388388
/// {
389389
/// let five = Rc::new(5);
@@ -624,7 +624,7 @@ impl<T: fmt::Debug> fmt::Debug for Rc<T> {
624624
///
625625
/// Weak references do not count when determining if the inner value should be dropped.
626626
///
627-
/// See the [module level documentation](../index.html) for more.
627+
/// See the [module level documentation](./index.html) for more.
628628
#[unsafe_no_drop_flag]
629629
#[unstable(feature = "alloc",
630630
reason = "Weak pointers may not belong in this module.")]
@@ -688,7 +688,7 @@ impl<T> Drop for Weak<T> {
688688
///
689689
/// // stuff
690690
///
691-
/// drop(weak_five); // explict drop
691+
/// drop(weak_five); // explicit drop
692692
/// }
693693
/// {
694694
/// let five = Rc::new(5);

branches/tmp/src/libcollections/bench.rs

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,40 @@ use std::rand;
1313
use std::rand::Rng;
1414
use test::{Bencher, black_box};
1515

16-
pub fn insert_rand_n<M, I, R>(n: uint,
16+
pub fn insert_rand_n<M, I, R>(n: usize,
1717
map: &mut M,
1818
b: &mut Bencher,
1919
mut insert: I,
2020
mut remove: R) where
21-
I: FnMut(&mut M, uint),
22-
R: FnMut(&mut M, uint),
21+
I: FnMut(&mut M, usize),
22+
R: FnMut(&mut M, usize),
2323
{
2424
// setup
2525
let mut rng = rand::weak_rng();
2626

2727
for _ in 0..n {
28-
insert(map, rng.gen::<uint>() % n);
28+
insert(map, rng.gen::<usize>() % n);
2929
}
3030

3131
// measure
3232
b.iter(|| {
33-
let k = rng.gen::<uint>() % n;
33+
let k = rng.gen::<usize>() % n;
3434
insert(map, k);
3535
remove(map, k);
3636
});
3737
black_box(map);
3838
}
3939

40-
pub fn insert_seq_n<M, I, R>(n: uint,
40+
pub fn insert_seq_n<M, I, R>(n: usize,
4141
map: &mut M,
4242
b: &mut Bencher,
4343
mut insert: I,
4444
mut remove: R) where
45-
I: FnMut(&mut M, uint),
46-
R: FnMut(&mut M, uint),
45+
I: FnMut(&mut M, usize),
46+
R: FnMut(&mut M, usize),
4747
{
4848
// setup
49-
for i in 0u..n {
49+
for i in 0..n {
5050
insert(map, i * 2);
5151
}
5252

@@ -60,18 +60,17 @@ pub fn insert_seq_n<M, I, R>(n: uint,
6060
black_box(map);
6161
}
6262

63-
pub fn find_rand_n<M, T, I, F>(n: uint,
63+
pub fn find_rand_n<M, T, I, F>(n: usize,
6464
map: &mut M,
6565
b: &mut Bencher,
6666
mut insert: I,
6767
mut find: F) where
68-
I: FnMut(&mut M, uint),
69-
F: FnMut(&M, uint) -> T,
68+
I: FnMut(&mut M, usize),
69+
F: FnMut(&M, usize) -> T,
7070
{
7171
// setup
7272
let mut rng = rand::weak_rng();
73-
let mut keys = (0..n).map(|_| rng.gen::<uint>() % n)
74-
.collect::<Vec<_>>();
73+
let mut keys: Vec<_> = (0..n).map(|_| rng.gen::<usize>() % n).collect();
7574

7675
for k in &keys {
7776
insert(map, *k);
@@ -88,16 +87,16 @@ pub fn find_rand_n<M, T, I, F>(n: uint,
8887
})
8988
}
9089

91-
pub fn find_seq_n<M, T, I, F>(n: uint,
90+
pub fn find_seq_n<M, T, I, F>(n: usize,
9291
map: &mut M,
9392
b: &mut Bencher,
9493
mut insert: I,
9594
mut find: F) where
96-
I: FnMut(&mut M, uint),
97-
F: FnMut(&M, uint) -> T,
95+
I: FnMut(&mut M, usize),
96+
F: FnMut(&M, usize) -> T,
9897
{
9998
// setup
100-
for i in 0u..n {
99+
for i in 0..n {
101100
insert(map, i);
102101
}
103102

0 commit comments

Comments
 (0)