]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/lib.rs
rollup merge of #20482: kmcallister/macro-reform
[rust.git] / src / librustc_driver / lib.rs
index a43ee3e6d338d676a0a0d943d3a063bae0f9e889..89b2e0f257acd97b5ca75a1b0c2b393e0f7e84dc 100644 (file)
@@ -148,7 +148,7 @@ fn run_compiler(args: &[String]) {
         _ => early_error("multiple input filenames provided")
     };
 
-    let sess = build_session(sopts, input_file_path, descriptions);
+    let mut sess = build_session(sopts, input_file_path, descriptions);
     let cfg = config::build_configuration(&sess);
     if print_crate_info(&sess, Some(&input), &odir, &ofile) {
         return
@@ -159,7 +159,7 @@ fn run_compiler(args: &[String]) {
         pretty::parse_pretty(&sess, a.as_slice(), false)
     });
     let pretty = if pretty.is_none() &&
-        sess.debugging_opt(config::UNSTABLE_OPTIONS) {
+        sess.unstable_options() {
             matches.opt_str("xpretty").map(|a| {
                 // extended with unstable pretty-print variants
                 pretty::parse_pretty(&sess, a.as_slice(), true)
@@ -176,6 +176,10 @@ fn run_compiler(args: &[String]) {
         None => {/* continue */ }
     }
 
+    if sess.unstable_options() {
+        sess.opts.show_span = matches.opt_str("show-span");
+    }
+
     let r = matches.opt_strs("Z");
     if r.contains(&("ls".to_string())) {
         match input {