about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-02 15:49:42 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-03 17:19:56 -0700
commit896cfcc67fb8d3e53a5dcf138f79909891bf940e (patch)
treedf4433cee95ca769c9dc664a63455bcc5f42c166 /src/compiletest
parentb981add9ee56a2d6dc11aa48f01aac5d0dda9327 (diff)
downloadrust-896cfcc67fb8d3e53a5dcf138f79909891bf940e.tar.gz
rust-896cfcc67fb8d3e53a5dcf138f79909891bf940e.zip
std: Remove generics from Option::expect
This commit removes the <M: Any + Send> type parameter from Option::expect in
favor of just taking a hard-coded `&str` argument. This allows this function to
move into libcore.

Previous code using strings with `expect` will continue to work, but code using
this implicitly to transmit task failure will need to unwrap manually with a
`match` statement.

[breaking-change]
Closes #14008
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/runtest.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 16149e9f277..10428244b71 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -361,7 +361,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                          ],
                          vec!(("".to_string(), "".to_string())),
                          Some("".to_string()))
-                .expect(format!("failed to exec `{}`", config.adb_path));
+                .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
             procsrv::run("",
                          config.adb_path.as_slice(),
@@ -372,7 +372,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                          ],
                          vec!(("".to_string(), "".to_string())),
                          Some("".to_string()))
-                .expect(format!("failed to exec `{}`", config.adb_path));
+                .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
             let adb_arg = format!("export LD_LIBRARY_PATH={}; \
                                    gdbserver :5039 {}/{}",
@@ -392,7 +392,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                                                       vec!(("".to_string(),
                                                             "".to_string())),
                                                       Some("".to_string()))
-                .expect(format!("failed to exec `{}`", config.adb_path));
+                .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
             loop {
                 //waiting 1 second for gdbserver start
                 timer::sleep(1000);
@@ -428,7 +428,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
                              debugger_opts.as_slice(),
                              vec!(("".to_string(), "".to_string())),
                              None)
-                .expect(format!("failed to exec `{}`", gdb_path));
+                .expect(format!("failed to exec `{}`", gdb_path).as_slice());
             let cmdline = {
                 let cmdline = make_cmdline("",
                                            "arm-linux-androideabi-gdb",
@@ -1207,7 +1207,7 @@ fn program_output(config: &Config, testfile: &Path, lib_path: &str, prog: String
                      prog.as_slice(),
                      args.as_slice(),
                      env,
-                     input).expect(format!("failed to exec `{}`", prog));
+                     input).expect(format!("failed to exec `{}`", prog).as_slice());
     dump_output(config, testfile, out.as_slice(), err.as_slice());
     return ProcRes {
         status: status,
@@ -1333,7 +1333,7 @@ fn _arm_exec_compiled_test(config: &Config,
                                    ],
                                    vec!(("".to_string(), "".to_string())),
                                    Some("".to_string()))
-        .expect(format!("failed to exec `{}`", config.adb_path));
+        .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
     if config.verbose {
         println!("push ({}) {} {} {}",
@@ -1363,7 +1363,7 @@ fn _arm_exec_compiled_test(config: &Config,
                  config.adb_path.as_slice(),
                  runargs.as_slice(),
                  vec!(("".to_string(), "".to_string())), Some("".to_string()))
-        .expect(format!("failed to exec `{}`", config.adb_path));
+        .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
     // get exitcode of result
     runargs = Vec::new();
@@ -1377,7 +1377,7 @@ fn _arm_exec_compiled_test(config: &Config,
                      runargs.as_slice(),
                      vec!(("".to_string(), "".to_string())),
                      Some("".to_string()))
-        .expect(format!("failed to exec `{}`", config.adb_path));
+        .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
     let mut exitcode: int = 0;
     for c in exitcode_out.as_slice().chars() {
@@ -1400,7 +1400,7 @@ fn _arm_exec_compiled_test(config: &Config,
                      runargs.as_slice(),
                      vec!(("".to_string(), "".to_string())),
                      Some("".to_string()))
-        .expect(format!("failed to exec `{}`", config.adb_path));
+        .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
     // get stderr of result
     runargs = Vec::new();
@@ -1414,7 +1414,7 @@ fn _arm_exec_compiled_test(config: &Config,
                      runargs.as_slice(),
                      vec!(("".to_string(), "".to_string())),
                      Some("".to_string()))
-        .expect(format!("failed to exec `{}`", config.adb_path));
+        .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
     dump_output(config,
                 testfile,
@@ -1448,7 +1448,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
                                            vec!(("".to_string(),
                                                  "".to_string())),
                                            Some("".to_string()))
-                .expect(format!("failed to exec `{}`", config.adb_path));
+                .expect(format!("failed to exec `{}`", config.adb_path).as_slice());
 
             if config.verbose {
                 println!("push ({}) {} {} {}",