Skip to content

Reduce warnings #11918

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

Merged
merged 3 commits into from
Jan 31, 2014
Merged
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
2 changes: 1 addition & 1 deletion src/libstd/io/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ mod test {
fn push_bytes_fail_reset_len() {
// push_bytes unsafely sets the vector length. This is testing that
// upon failure the length is reset correctly.
let reader = ErroringLaterReader {
let _reader = ErroringLaterReader {
count: 0,
};
// FIXME (#7049): Figure out some other way to do this.
Expand Down
4 changes: 0 additions & 4 deletions src/libstd/io/net/addrinfo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ fn lookup(hostname: Option<&str>, servname: Option<&str>, hint: Option<Hint>)
// permission without help of apk
#[cfg(test, not(target_os = "android"))]
mod test {
use io::net::ip::Ipv4Addr;
use prelude::*;
use super::*;

iotest!(fn dns_smoke_test() {
let ipaddrs = get_host_addresses("localhost").unwrap();
let mut found_local = false;
Expand Down
6 changes: 3 additions & 3 deletions src/libstd/io/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ mod test {

spawn(proc() {
port.recv();
let stream = TcpStream::connect(addr);
let _stream = TcpStream::connect(addr);
// Close
port.recv();
});
Expand All @@ -641,12 +641,12 @@ mod test {
let mut acceptor = TcpListener::bind(addr).listen();
chan.send(());
{
let stream = acceptor.accept();
let _stream = acceptor.accept();
// Close client
chan.send(());
}
// Close listener
}
let listener = TcpListener::bind(addr);
let _listener = TcpListener::bind(addr);
})
}
1 change: 0 additions & 1 deletion src/libstd/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,6 @@ mod tests {

use num::*;
use num;
use mem;

#[test]
fn test_num() {
Expand Down
1 change: 0 additions & 1 deletion src/libstd/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,6 @@ mod tests {

use num::*;
use num;
use mem;

#[test]
fn test_num() {
Expand Down
1 change: 0 additions & 1 deletion src/libstd/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ mod tests {
use num;
use num::CheckedDiv;
use num::Bitwise;
use mem;

#[test]
fn test_num() {
Expand Down
1 change: 0 additions & 1 deletion src/libstd/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,6 @@ pub fn test_num<T:Num + NumCast>(ten: T, two: T) {
mod tests {
use prelude::*;
use super::*;
use num;
use i8;
use i16;
use i32;
Expand Down
1 change: 0 additions & 1 deletion src/libstd/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ mod tests {
use num;
use num::CheckedDiv;
use num::Bitwise;
use mem;
use u16;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/rt/unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mod libunwind {
//! Unwind library interface

#[allow(non_camel_case_types)];
#[allow(dead_code)] // these are just bindings
#[allow(dead_code)]; // these are just bindings

use libc::{uintptr_t};

Expand Down