rollup merge of #23886: demelev/remove_as_slice_usage

This commit is contained in:
Alex Crichton 2015-03-31 10:15:35 -07:00
commit 6d2c640cf0
24 changed files with 41 additions and 42 deletions

View file

@ -77,6 +77,6 @@ fn main() {
let mut tc = TestCalls { count: 1 };
// we should never get use this filename, but lets make sure they are valid args.
let args = vec!["compiler-calls".to_string(), "foo.rs".to_string()];
rustc_driver::run_compiler(args.as_slice(), &mut tc);
rustc_driver::run_compiler(&args[..], &mut tc);
assert!(tc.count == 30);
}

View file

@ -29,7 +29,7 @@ fn foo<'a>(map: RefCell<HashMap<&'static str, &'a [u8]>>) {
// supposed to match the lifetime `'a`) ...
fn foo<'a>(map: RefCell<HashMap<&'static str, &'a [u8]>>) {
let one = [1];
assert_eq!(map.borrow().get("one"), Some(&one.as_slice()));
assert_eq!(map.borrow().get("one"), Some(&&one[..]));
}
#[cfg(all(not(cannot_use_this_yet),not(cannot_use_this_yet_either)))]