about summary refs log tree commit diff
path: root/src/librustc_driver/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_driver/lib.rs')
-rw-r--r--src/librustc_driver/lib.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 1c2d956e279..f3a934857ec 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -90,12 +90,12 @@ fn run_compiler(args: &[String]) {
     let descriptions = diagnostics::registry::Registry::new(&DIAGNOSTICS);
     match matches.opt_str("explain") {
         Some(ref code) => {
-            match descriptions.find_description(code.index(&FullRange)) {
+            match descriptions.find_description(&code[]) {
                 Some(ref description) => {
                     println!("{}", description);
                 }
                 None => {
-                    early_error(format!("no extended information for {}", code).index(&FullRange));
+                    early_error(&format!("no extended information for {}", code)[]);
                 }
             }
             return;
@@ -121,7 +121,7 @@ fn run_compiler(args: &[String]) {
             early_error("no input filename given");
         }
         1u => {
-            let ifile = matches.free[0].index(&FullRange);
+            let ifile = &matches.free[0][];
             if ifile == "-" {
                 let contents = io::stdin().read_to_end().unwrap();
                 let src = String::from_utf8(contents).unwrap();
@@ -317,7 +317,7 @@ Available lint options:
         for lint in lints.into_iter() {
             let name = lint.name_lower().replace("_", "-");
             println!("    {}  {:7.7}  {}",
-                     padded(name.index(&FullRange)), lint.default_level.as_str(), lint.desc);
+                     padded(&name[]), lint.default_level.as_str(), lint.desc);
         }
         println!("\n");
     };
@@ -347,7 +347,7 @@ Available lint options:
             let desc = to.into_iter().map(|x| x.as_str().replace("_", "-"))
                          .collect::<Vec<String>>().connect(", ");
             println!("    {}  {}",
-                     padded(name.index(&FullRange)), desc);
+                     padded(&name[]), desc);
         }
         println!("\n");
     };
@@ -413,7 +413,7 @@ pub fn handle_options(mut args: Vec<String>) -> Option<getopts::Matches> {
     }
 
     let matches =
-        match getopts::getopts(args.index(&FullRange), config::optgroups().index(&FullRange)) {
+        match getopts::getopts(&args[], &config::optgroups()[]) {
             Ok(m) => m,
             Err(f_stable_attempt) => {
                 // redo option parsing, including unstable options this time,
@@ -587,15 +587,15 @@ pub fn monitor<F:FnOnce()+Send>(f: F) {
                     "run with `RUST_BACKTRACE=1` for a backtrace".to_string(),
                 ];
                 for note in xs.iter() {
-                    emitter.emit(None, note.index(&FullRange), None, diagnostic::Note)
+                    emitter.emit(None, &note[], None, diagnostic::Note)
                 }
 
                 match r.read_to_string() {
                     Ok(s) => println!("{}", s),
                     Err(e) => {
                         emitter.emit(None,
-                                     format!("failed to read internal \
-                                              stderr: {}", e).index(&FullRange),
+                                     &format!("failed to read internal \
+                                              stderr: {}", e)[],
                                      None,
                                      diagnostic::Error)
                     }