Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce warnings #8197

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/libextra/bitv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1635,9 +1635,9 @@ mod tests {
fn bench_btv_small_iter(b: &mut BenchHarness) {
let bitv = Bitv::new(uint::bits, false);
do b.iter {
let mut sum = 0;
let mut _sum = 0;
foreach pres in bitv.iter() {
sum += pres as uint;
_sum += pres as uint;
}
}
}
Expand All @@ -1646,9 +1646,9 @@ mod tests {
fn bench_bitv_big_iter(b: &mut BenchHarness) {
let bitv = Bitv::new(BENCH_BITS, false);
do b.iter {
let mut sum = 0;
let mut _sum = 0;
foreach pres in bitv.iter() {
sum += pres as uint;
_sum += pres as uint;
}
}
}
Expand All @@ -1658,9 +1658,9 @@ mod tests {
let bitv = BitvSet::from_bitv(from_fn(BENCH_BITS,
|idx| {idx % 3 == 0}));
do b.iter {
let mut sum = 0;
let mut _sum = 0;
foreach idx in bitv.iter() {
sum += idx;
_sum += idx;
}
}
}
Expand Down
14 changes: 8 additions & 6 deletions src/libextra/flatpipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,16 +633,12 @@ pub mod bytepipes {
#[cfg(test)]
mod test {

use flatpipes::{Flattener, Unflattener};
use flatpipes::bytepipes::*;
use flatpipes::BytePort;
use flatpipes::pod;
use flatpipes::serial;
use io_util::BufReader;
use flatpipes::{BytePort, FlatChan, FlatPort};

use std::comm;
use std::io::BytesWriter;
use std::result;
use std::task;

#[test]
Expand Down Expand Up @@ -727,7 +723,11 @@ mod test {

// FIXME #2064: Networking doesn't work on x86
// XXX Broken until networking support is added back
/*#[test]
/*
use flatpipes::{Flattener, Unflattener, FlatChan, FlatPort};
use flatpipes::bytepipes::*;

#[test]
#[cfg(target_arch = "x86_64")]
fn test_pod_tcp_stream() {
fn reader_port(buf: TcpSocketBuf
Expand Down Expand Up @@ -767,6 +767,8 @@ mod test {
port: uint) {

use std::cell::Cell;
use std::comm;
use std::result;
use net::ip;
use net::tcp;
use uv;
Expand Down
5 changes: 0 additions & 5 deletions src/librustc/middle/typeck/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2746,13 +2746,8 @@ pub fn check_expr_with_unifier(fcx: @mut FnCtxt,
}
ast::expr_vec(ref args, mutbl) => {
let t: ty::t = fcx.infcx().next_ty_var();
let mut arg_is_bot = false;
let mut arg_is_err = false;
foreach e in args.iter() {
check_expr_has_type(fcx, *e, t);
let arg_t = fcx.expr_ty(*e);
arg_is_bot |= ty::type_is_bot(arg_t);
arg_is_err |= ty::type_is_error(arg_t);
}
let typ = ty::mk_evec(tcx, ty::mt {ty: t, mutbl: mutbl},
ty::vstore_fixed(args.len()));
Expand Down