From 6ea97c457ac12d9d8c00d7d1e64db2ecc26b468b Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Mon, 23 Feb 2015 01:49:07 +0200 Subject: [PATCH] runtest: update slicing syntax where [] becomes [..] --- src/compiletest/runtest.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 1cbb8742bbc5..e62cb851fb79 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -89,7 +89,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) { let proc_res = compile_test(config, props, testfile); if proc_res.status.success() { - fatal_proc_rec(&format!("{} test compiled successfully!", config.mode)[], + fatal_proc_rec(&format!("{} test compiled successfully!", config.mode)[..], &proc_res); } @@ -398,7 +398,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { for line in breakpoint_lines.iter() { script_str.push_str(&format!("break {:?}:{}\n", testfile.filename_display(), - *line)[]); + *line)[..]); } script_str.push_str(&cmds); script_str.push_str("quit\n"); @@ -553,17 +553,17 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) { script_str.push_str("set print pretty off\n"); // Add the pretty printer directory to GDB's source-file search path - script_str.push_str(&format!("directory {}\n", rust_pp_module_abs_path)[]); + script_str.push_str(&format!("directory {}\n", rust_pp_module_abs_path)[..]); // Load the target executable script_str.push_str(&format!("file {}\n", - exe_file.as_str().unwrap().replace("\\", "\\\\"))[]); + exe_file.as_str().unwrap().replace("\\", "\\\\"))[..]); // Add line breakpoints for line in &breakpoint_lines { script_str.push_str(&format!("break '{}':{}\n", testfile.filename_display(), - *line)[]); + *line)[..]); } script_str.push_str(&cmds); @@ -689,7 +689,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path) .unwrap() .to_string(); - script_str.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[]); + script_str.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[..])[..]); script_str.push_str("type summary add --no-value "); script_str.push_str("--python-function lldb_rust_formatters.print_val "); script_str.push_str("-x \".*\" --category Rust\n");