Skip to content

Commit 9554794

Browse files
committed
Add unstable_options method
1 parent c43efee commit 9554794

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/librustc/session/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ impl Session {
202202
pub fn show_span(&self) -> bool {
203203
self.debugging_opt(config::SHOW_SPAN)
204204
}
205+
pub fn unstable_options(&self) -> bool {
206+
self.debugging_opt(config::UNSTABLE_OPTIONS)
207+
}
205208
pub fn sysroot<'a>(&'a self) -> &'a Path {
206209
match self.opts.maybe_sysroot {
207210
Some (ref sysroot) => sysroot,

src/librustc_driver/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ fn run_compiler(args: &[String]) {
143143
pretty::parse_pretty(&sess, a.as_slice(), false)
144144
});
145145
let pretty = if pretty.is_none() &&
146-
sess.debugging_opt(config::UNSTABLE_OPTIONS) {
146+
sess.unstable_options() {
147147
matches.opt_str("xpretty").map(|a| {
148148
// extended with unstable pretty-print variants
149149
pretty::parse_pretty(&sess, a.as_slice(), true)

0 commit comments

Comments
 (0)