Skip to content

Commit

Permalink
Auto merge of #21997 - Manishearth:rollup, r=alexcrichton
Browse files Browse the repository at this point in the history
None
  • Loading branch information
bors committed Feb 6, 2015
2 parents b75b21c + df7db97 commit d3732a1
Show file tree
Hide file tree
Showing 110 changed files with 2,054 additions and 2,032 deletions.
5 changes: 4 additions & 1 deletion src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ pub fn parse_config(args: Vec<String> ) -> Config {
}

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

let filter = if !matches.free.is_empty() {
Expand Down
1 change: 0 additions & 1 deletion src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1813,7 +1813,6 @@ default visibility with the `priv` keyword. When an item is declared as `pub`,
it can be thought of as being accessible to the outside world. For example:

```
# #![allow(missing_copy_implementations)]
# fn main() {}
// Declare a private struct
struct Foo;
Expand Down
2 changes: 1 addition & 1 deletion src/doc/trpl/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ fn print<'a>(s: &'a str); // expanded
fn debug(lvl: u32, s: &str); // elided
fn debug<'a>(lvl: u32, s: &'a str); // expanded
// In the preceeding example, `lvl` doesn't need a lifetime because it's not a
// In the preceding example, `lvl` doesn't need a lifetime because it's not a
// reference (`&`). Only things relating to references (such as a `struct`
// which contains a reference) need lifetimes.
Expand Down
4 changes: 2 additions & 2 deletions src/etc/featureck.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@
if not name in joint_features:
print "error: feature '" + name + "' is both a lang and lib feature but not whitelisted"
errors = True
lang_status = lang_feature_stats[name][3]
lang_status = language_feature_stats[name][3]
lib_status = lib_feature_stats[name][3]
lang_stable_since = lang_feature_stats[name][4]
lang_stable_since = language_feature_stats[name][4]
lib_stable_since = lib_feature_stats[name][4]

if lang_status != lib_status and lib_status != "deprecated":
Expand Down
2 changes: 1 addition & 1 deletion src/grammar/parser-lalr.y
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ maybe_stmts
//
// There are also two other expr subtypes: first, nonparen_expr
// disallows exprs surrounded by parens (including tuple expressions),
// this is neccesary for BOX (place) expressions, so a parens expr
// this is necessary for BOX (place) expressions, so a parens expr
// following the BOX is always parsed as the place. There is also
// expr_norange used in index_expr, which disallows '..' in
// expressions as that has special meaning inside of brackets.
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
///
/// // stuff
///
/// drop(five); // explict drop
/// drop(five); // explicit drop
/// }
/// {
/// let five = Arc::new(5);
Expand Down Expand Up @@ -441,7 +441,7 @@ impl<T: Sync + Send> Drop for Weak<T> {
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// drop(weak_five); // explicit drop
/// }
/// {
/// let five = Arc::new(5);
Expand Down
4 changes: 3 additions & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@
#![feature(unboxed_closures)]
#![feature(core)]
#![feature(hash)]
#![feature(libc)]
#![cfg_attr(all(not(feature = "external_funcs"), not(feature = "external_crate")),
feature(libc))]


#[macro_use]
extern crate core;
Expand Down
4 changes: 2 additions & 2 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ impl<T> Drop for Rc<T> {
///
/// // stuff
///
/// drop(five); // explict drop
/// drop(five); // explicit drop
/// }
/// {
/// let five = Rc::new(5);
Expand Down Expand Up @@ -688,7 +688,7 @@ impl<T> Drop for Weak<T> {
///
/// // stuff
///
/// drop(weak_five); // explict drop
/// drop(weak_five); // explicit drop
/// }
/// {
/// let five = Rc::new(5);
Expand Down
35 changes: 17 additions & 18 deletions src/libcollections/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ use std::rand;
use std::rand::Rng;
use test::{Bencher, black_box};

pub fn insert_rand_n<M, I, R>(n: uint,
pub fn insert_rand_n<M, I, R>(n: usize,
map: &mut M,
b: &mut Bencher,
mut insert: I,
mut remove: R) where
I: FnMut(&mut M, uint),
R: FnMut(&mut M, uint),
I: FnMut(&mut M, usize),
R: FnMut(&mut M, usize),
{
// setup
let mut rng = rand::weak_rng();

for _ in 0..n {
insert(map, rng.gen::<uint>() % n);
insert(map, rng.gen::<usize>() % n);
}

// measure
b.iter(|| {
let k = rng.gen::<uint>() % n;
let k = rng.gen::<usize>() % n;
insert(map, k);
remove(map, k);
});
black_box(map);
}

pub fn insert_seq_n<M, I, R>(n: uint,
pub fn insert_seq_n<M, I, R>(n: usize,
map: &mut M,
b: &mut Bencher,
mut insert: I,
mut remove: R) where
I: FnMut(&mut M, uint),
R: FnMut(&mut M, uint),
I: FnMut(&mut M, usize),
R: FnMut(&mut M, usize),
{
// setup
for i in 0u..n {
for i in 0..n {
insert(map, i * 2);
}

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

pub fn find_rand_n<M, T, I, F>(n: uint,
pub fn find_rand_n<M, T, I, F>(n: usize,
map: &mut M,
b: &mut Bencher,
mut insert: I,
mut find: F) where
I: FnMut(&mut M, uint),
F: FnMut(&M, uint) -> T,
I: FnMut(&mut M, usize),
F: FnMut(&M, usize) -> T,
{
// setup
let mut rng = rand::weak_rng();
let mut keys = (0..n).map(|_| rng.gen::<uint>() % n)
.collect::<Vec<_>>();
let mut keys: Vec<_> = (0..n).map(|_| rng.gen::<usize>() % n).collect();

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

pub fn find_seq_n<M, T, I, F>(n: uint,
pub fn find_seq_n<M, T, I, F>(n: usize,
map: &mut M,
b: &mut Bencher,
mut insert: I,
mut find: F) where
I: FnMut(&mut M, uint),
F: FnMut(&M, uint) -> T,
I: FnMut(&mut M, usize),
F: FnMut(&M, usize) -> T,
{
// setup
for i in 0u..n {
for i in 0..n {
insert(map, i);
}

Expand Down
Loading

0 comments on commit d3732a1

Please sign in to comment.