Skip to content

Commit f553f58

Browse files
committed
Rollup merge of 21681 - japaric:no-warn, r=alexcrichton
2 parents 7abbc96 + 57dd4ea commit f553f58

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

src/liballoc/heap.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#[cfg(not(test))]
1112
use core::ptr::PtrExt;
1213

1314
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`

src/libfmt_macros/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ mod tests {
447447
use super::*;
448448

449449
fn same(fmt: &'static str, p: &[Piece<'static>]) {
450-
let mut parser = Parser::new(fmt);
450+
let parser = Parser::new(fmt);
451451
assert!(p == parser.collect::<Vec<Piece<'static>>>());
452452
}
453453

src/librustc_back/rpath.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ fn minimize_rpaths(rpaths: &[String]) -> Vec<String> {
151151
mod test {
152152
use super::{RPathConfig};
153153
use super::{minimize_rpaths, rpaths_to_flags, get_rpath_relative_to_output};
154-
use syntax::abi;
155154

156155
#[test]
157156
fn test_rpaths_to_flags() {

src/libserialize/json.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ mod tests {
26182618
use super::JsonEvent::*;
26192619
use super::{Json, from_str, DecodeResult, DecoderError, JsonEvent, Parser,
26202620
StackElement, Stack, Decoder, Encoder, EncoderError};
2621-
use std::{i64, u64, f32, f64, old_io};
2621+
use std::{i64, u64, f32, f64};
26222622
use std::collections::BTreeMap;
26232623
use std::num::Float;
26242624
use std::string;
@@ -3928,7 +3928,6 @@ mod tests {
39283928

39293929
#[test]
39303930
fn test_encode_hashmap_with_arbitrary_key() {
3931-
use std::str::from_utf8;
39323931
use std::old_io::Writer;
39333932
use std::collections::HashMap;
39343933
use std::fmt;

src/libsyntax/ext/expand.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,15 +1433,12 @@ mod test {
14331433
use super::{pattern_bindings, expand_crate};
14341434
use super::{PatIdentFinder, IdentRenamer, PatIdentRenamer, ExpansionConfig};
14351435
use ast;
1436-
use ast::{Attribute_, AttrOuter, MetaWord, Name};
1437-
use attr;
1436+
use ast::Name;
14381437
use codemap;
1439-
use codemap::Spanned;
14401438
use ext::mtwt;
14411439
use fold::Folder;
14421440
use parse;
14431441
use parse::token;
1444-
use ptr::P;
14451442
use util::parser_testing::{string_to_parser};
14461443
use util::parser_testing::{string_to_pat, string_to_crate, strs_to_idents};
14471444
use visit;

src/libsyntax/print/pprust.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2975,7 +2975,6 @@ mod test {
29752975
use ast_util;
29762976
use codemap;
29772977
use parse::token;
2978-
use ptr::P;
29792978

29802979
#[test]
29812980
fn test_fun_to_string() {

src/libtest/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,9 +1126,8 @@ pub mod bench {
11261126
mod tests {
11271127
use test::{TrFailed, TrIgnored, TrOk, filter_tests, parse_opts,
11281128
TestDesc, TestDescAndFn, TestOpts, run_test,
1129-
Metric, MetricMap,
1129+
MetricMap,
11301130
StaticTestName, DynTestName, DynTestFn, ShouldFail};
1131-
use std::old_io::TempDir;
11321131
use std::thunk::Thunk;
11331132
use std::sync::mpsc::channel;
11341133

0 commit comments

Comments
 (0)