1
Fork 0

Add unstable_options method

This commit is contained in:
Seo Sanghyeon 2014-12-27 18:19:27 +09:00
parent c43efee6de
commit 9554794d22
2 changed files with 4 additions and 1 deletions

View file

@ -202,6 +202,9 @@ impl Session {
pub fn show_span(&self) -> bool { pub fn show_span(&self) -> bool {
self.debugging_opt(config::SHOW_SPAN) 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 { pub fn sysroot<'a>(&'a self) -> &'a Path {
match self.opts.maybe_sysroot { match self.opts.maybe_sysroot {
Some (ref sysroot) => sysroot, Some (ref sysroot) => sysroot,

View file

@ -143,7 +143,7 @@ fn run_compiler(args: &[String]) {
pretty::parse_pretty(&sess, a.as_slice(), false) pretty::parse_pretty(&sess, a.as_slice(), false)
}); });
let pretty = if pretty.is_none() && let pretty = if pretty.is_none() &&
sess.debugging_opt(config::UNSTABLE_OPTIONS) { sess.unstable_options() {
matches.opt_str("xpretty").map(|a| { matches.opt_str("xpretty").map(|a| {
// extended with unstable pretty-print variants // extended with unstable pretty-print variants
pretty::parse_pretty(&sess, a.as_slice(), true) pretty::parse_pretty(&sess, a.as_slice(), true)