cleanup warnings from librustc
This commit is contained in:
parent
a4df35f2bc
commit
9635b30837
@ -211,8 +211,8 @@ mod test {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_rpaths_to_flags() {
|
fn test_rpaths_to_flags() {
|
||||||
let flags = rpaths_to_flags(~[Path("path1"),
|
let flags = rpaths_to_flags([Path("path1"),
|
||||||
Path("path2")]);
|
Path("path2")]);
|
||||||
assert_eq!(flags, ~[~"-Wl,-rpath,path1", ~"-Wl,-rpath,path2"]);
|
assert_eq!(flags, ~[~"-Wl,-rpath,path1", ~"-Wl,-rpath,path2"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -243,10 +243,10 @@ fn test_minimize1() {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_minimize2() {
|
fn test_minimize2() {
|
||||||
let res = minimize_rpaths(~[Path("1a"), Path("2"), Path("2"),
|
let res = minimize_rpaths([Path("1a"), Path("2"), Path("2"),
|
||||||
Path("1a"), Path("4a"),Path("1a"),
|
Path("1a"), Path("4a"),Path("1a"),
|
||||||
Path("2"), Path("3"), Path("4a"),
|
Path("2"), Path("3"), Path("4a"),
|
||||||
Path("3")]);
|
Path("3")]);
|
||||||
assert_eq!(res, ~[Path("1a"), Path("2"), Path("4a"), Path("3")]);
|
assert_eq!(res, ~[Path("1a"), Path("2"), Path("4a"), Path("3")]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
use core::os;
|
use core::os;
|
||||||
use core::str;
|
use core::str;
|
||||||
use core::vec;
|
use core::vec;
|
||||||
use extra::getopts::groups::{optopt, optmulti, optflag, optflagopt, getopts};
|
use extra::getopts::groups::{optopt, optmulti, optflag, optflagopt};
|
||||||
use extra::getopts::{opt_present};
|
use extra::getopts::{opt_present};
|
||||||
use extra::getopts;
|
use extra::getopts;
|
||||||
use syntax::ast;
|
use syntax::ast;
|
||||||
@ -942,7 +942,7 @@ fn test_switch_implies_cfg_test() {
|
|||||||
@~"rustc", matches, diagnostic::emit);
|
@~"rustc", matches, diagnostic::emit);
|
||||||
let sess = build_session(sessopts, diagnostic::emit);
|
let sess = build_session(sessopts, diagnostic::emit);
|
||||||
let cfg = build_configuration(sess, @~"whatever", &str_input(~""));
|
let cfg = build_configuration(sess, @~"whatever", &str_input(~""));
|
||||||
assert!((attr::contains_name(cfg, ~"test")));
|
assert!((attr::contains_name(cfg, "test")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the user supplies --test and --cfg test, don't implicitly add
|
// When the user supplies --test and --cfg test, don't implicitly add
|
||||||
@ -950,7 +950,7 @@ fn test_switch_implies_cfg_test() {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_switch_implies_cfg_test_unless_cfg_test() {
|
fn test_switch_implies_cfg_test_unless_cfg_test() {
|
||||||
let matches =
|
let matches =
|
||||||
&match getopts(~[~"--test", ~"--cfg=test"], optgroups()) {
|
&match getopts([~"--test", ~"--cfg=test"], optgroups()) {
|
||||||
Ok(copy m) => m,
|
Ok(copy m) => m,
|
||||||
Err(copy f) => {
|
Err(copy f) => {
|
||||||
fail!("test_switch_implies_cfg_test_unless_cfg_test: %s", getopts::fail_str(f));
|
fail!("test_switch_implies_cfg_test_unless_cfg_test: %s", getopts::fail_str(f));
|
||||||
@ -960,7 +960,7 @@ fn test_switch_implies_cfg_test_unless_cfg_test() {
|
|||||||
@~"rustc", matches, diagnostic::emit);
|
@~"rustc", matches, diagnostic::emit);
|
||||||
let sess = build_session(sessopts, diagnostic::emit);
|
let sess = build_session(sessopts, diagnostic::emit);
|
||||||
let cfg = build_configuration(sess, @~"whatever", &str_input(~""));
|
let cfg = build_configuration(sess, @~"whatever", &str_input(~""));
|
||||||
let test_items = attr::find_meta_items_by_name(cfg, ~"test");
|
let test_items = attr::find_meta_items_by_name(cfg, "test");
|
||||||
assert_eq!(test_items.len(), 1u);
|
assert_eq!(test_items.len(), 1u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
|
|
||||||
use driver::session::Session;
|
|
||||||
use driver::session;
|
use driver::session;
|
||||||
use middle::ty;
|
use middle::ty;
|
||||||
use middle::pat_util;
|
use middle::pat_util;
|
||||||
|
@ -535,7 +535,7 @@ fn set_module_kind(@mut self,
|
|||||||
parent_link: ParentLink,
|
parent_link: ParentLink,
|
||||||
def_id: Option<def_id>,
|
def_id: Option<def_id>,
|
||||||
kind: ModuleKind,
|
kind: ModuleKind,
|
||||||
sp: span) {
|
_sp: span) {
|
||||||
match self.type_def {
|
match self.type_def {
|
||||||
None => {
|
None => {
|
||||||
let module = @mut Module(parent_link, def_id, kind);
|
let module = @mut Module(parent_link, def_id, kind);
|
||||||
@ -2586,8 +2586,8 @@ fn resolve_module_path_from_root(@mut self,
|
|||||||
(ImportSearch, ImplModuleKind) => {
|
(ImportSearch, ImplModuleKind) => {
|
||||||
self.session.span_err(
|
self.session.span_err(
|
||||||
span,
|
span,
|
||||||
~"cannot import from a trait \
|
"cannot import from a trait \
|
||||||
or type implementation");
|
or type implementation");
|
||||||
return Failed;
|
return Failed;
|
||||||
}
|
}
|
||||||
(_, _) => search_module = module_def,
|
(_, _) => search_module = module_def,
|
||||||
|
@ -873,7 +873,7 @@ pub fn trans_trait_cast(bcx: block,
|
|||||||
val: @ast::expr,
|
val: @ast::expr,
|
||||||
id: ast::node_id,
|
id: ast::node_id,
|
||||||
dest: expr::Dest,
|
dest: expr::Dest,
|
||||||
store: ty::TraitStore)
|
_store: ty::TraitStore)
|
||||||
-> block {
|
-> block {
|
||||||
let mut bcx = bcx;
|
let mut bcx = bcx;
|
||||||
let _icx = bcx.insn_ctxt("impl::trans_cast");
|
let _icx = bcx.insn_ctxt("impl::trans_cast");
|
||||||
|
@ -145,7 +145,7 @@ fn vstore_name_and_extra(&mut self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn leaf(&mut self, name: ~str) {
|
fn leaf(&mut self, name: ~str) {
|
||||||
self.visit(name, ~[]);
|
self.visit(name, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Entrypoint
|
// Entrypoint
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
use core::prelude::*;
|
use core::prelude::*;
|
||||||
|
|
||||||
use core;
|
|
||||||
|
|
||||||
#[deriving(Eq, IterBytes)]
|
#[deriving(Eq, IterBytes)]
|
||||||
pub struct EnumSet<E> {
|
pub struct EnumSet<E> {
|
||||||
// We must maintain the invariant that no bits are set
|
// We must maintain the invariant that no bits are set
|
||||||
|
Loading…
Reference in New Issue
Block a user