Update to rust HEAD

This commit is contained in:
Erick Tryzelaar 2015-03-19 07:35:07 -07:00
parent e778c7e25c
commit c8b2ad01b5
5 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
#![feature(custom_derive, collections, core, io, plugin, test)]
#![feature(custom_derive, collections, core, plugin, test)]
#![allow(non_camel_case_types)]
#![plugin(serde_macros)]

View File

@ -1,4 +1,4 @@
#![feature(custom_derive, core, plugin, test)]
#![feature(custom_derive, plugin, test)]
#![plugin(serde_macros)]
extern crate serde;
@ -403,7 +403,7 @@ fn bench_decoder_000(b: &mut Bencher) {
fn bench_decoder_003(b: &mut Bencher) {
b.iter(|| {
let mut m: HashMap<String, isize> = HashMap::new();
for i in range(0, 3) {
for i in (0 .. 3) {
m.insert(i.to_string(), i);
}
run_decoder(decoder::IsizeDecoder::new(m.clone()), m)
@ -414,7 +414,7 @@ fn bench_decoder_003(b: &mut Bencher) {
fn bench_decoder_100(b: &mut Bencher) {
b.iter(|| {
let mut m: HashMap<String, isize> = HashMap::new();
for i in range(0, 100) {
for i in (0 .. 100) {
m.insert(i.to_string(), i);
}
run_decoder(decoder::IsizeDecoder::new(m.clone()), m)
@ -443,7 +443,7 @@ fn bench_deserializer_000(b: &mut Bencher) {
fn bench_deserializer_003(b: &mut Bencher) {
b.iter(|| {
let mut m: HashMap<String, isize> = HashMap::new();
for i in range(0, 3) {
for i in (0 .. 3) {
m.insert(i.to_string(), i);
}
run_deserializer(deserializer::IsizeDeserializer::new(m.clone()), m)
@ -454,7 +454,7 @@ fn bench_deserializer_003(b: &mut Bencher) {
fn bench_deserializer_100(b: &mut Bencher) {
b.iter(|| {
let mut m: HashMap<String, isize> = HashMap::new();
for i in range(0, 100) {
for i in (0 .. 100) {
m.insert(i.to_string(), i);
}
run_deserializer(deserializer::IsizeDeserializer::new(m.clone()), m)

View File

@ -1,4 +1,4 @@
#![feature(core, plugin, test)]
#![feature(plugin, test)]
#![plugin(serde_macros)]
extern crate serde;
@ -537,7 +537,7 @@ fn bench_decoder_usize_003(b: &mut Bencher) {
#[bench]
fn bench_decoder_usize_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<usize> = range(0, 100).collect();
let v: Vec<usize> = (0 .. 100).collect();
run_decoder(decoder::UsizeDecoder::new(v.clone()), v)
})
}
@ -561,7 +561,7 @@ fn bench_decoder_u8_003(b: &mut Bencher) {
#[bench]
fn bench_decoder_u8_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = range(0u8, 100).collect();
let v: Vec<u8> = (0 .. 100).collect();
run_decoder(decoder::U8Decoder::new(v.clone()), v)
})
}
@ -585,7 +585,7 @@ fn bench_deserializer_usize_003(b: &mut Bencher) {
#[bench]
fn bench_deserializer_usize_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<usize> = range(0, 100).collect();
let v: Vec<usize> = (0 .. 100).collect();
run_deserializer(deserializer::Deserializer::new(v.clone()), v)
})
}
@ -609,7 +609,7 @@ fn bench_deserializer_u8_003(b: &mut Bencher) {
#[bench]
fn bench_deserializer_u8_100(b: &mut Bencher) {
b.iter(|| {
let v: Vec<u8> = range(0u8, 100).collect();
let v: Vec<u8> = (0 .. 100).collect();
run_deserializer(deserializer::Deserializer::new(v.clone()), v)
})
}

View File

@ -289,7 +289,7 @@ fn deserialize_seq(
struct_path: ast::Path,
fields: usize,
) -> P<ast::Expr> {
let let_values: Vec<P<_>> = (0 .. fields)
let let_values: Vec<P<ast::Stmt>> = (0 .. fields)
.map(|i| {
let name = builder.id(format!("__field{}", i));
quote_stmt!(cx,
@ -299,7 +299,7 @@ fn deserialize_seq(
return Err(::serde::de::Error::end_of_stream_error());
}
};
)
).unwrap()
})
.collect();
@ -659,7 +659,7 @@ fn deserialize_map(
// Declare each field.
let let_values: Vec<P<ast::Stmt>> = field_names.iter()
.map(|field_name| quote_stmt!(cx, let mut $field_name = None;))
.map(|field_name| quote_stmt!(cx, let mut $field_name = None;).unwrap())
.collect();
// Match arms to extract a value for a field.
@ -692,7 +692,7 @@ fn deserialize_map(
Some($field_name) => $field_name,
None => $missing_expr,
};
)
).unwrap()
})
.collect();

View File

@ -1,4 +1,4 @@
#![feature(core, io, std_misc, unicode)]
#![feature(core, std_misc, unicode)]
extern crate unicode;