]> git.lizzy.rs Git - rust.git/commitdiff
Add unstable_options method
authorSeo Sanghyeon <sanxiyn@gmail.com>
Sat, 27 Dec 2014 09:19:27 +0000 (18:19 +0900)
committerSeo Sanghyeon <sanxiyn@gmail.com>
Sat, 27 Dec 2014 09:19:27 +0000 (18:19 +0900)
src/librustc/session/mod.rs
src/librustc_driver/lib.rs

index 37bdd1673e9ca3cb69b439e8bd8dffda0544603c..c120ac53b7811cbc8aecf2146f0e8433119d4286 100644 (file)
@@ -202,6 +202,9 @@ pub fn no_landing_pads(&self) -> bool {
     pub fn show_span(&self) -> bool {
         self.debugging_opt(config::SHOW_SPAN)
     }
+    pub fn unstable_options(&self) -> bool {
+        self.debugging_opt(config::UNSTABLE_OPTIONS)
+    }
     pub fn sysroot<'a>(&'a self) -> &'a Path {
         match self.opts.maybe_sysroot {
             Some (ref sysroot) => sysroot,
index e2791aff14e49bcef25018d580f4a222263c7ee4..5cd87a1e4c080fbda8eea06643c714a2976e1a98 100644 (file)
@@ -143,7 +143,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)