replace deprecated as_slice()
This commit is contained in:
parent
6cf3b0b74a
commit
df65f59fe9
24 changed files with 41 additions and 42 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)))]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue