oh, duh. will-do


On Wed, Feb 19, 2014 at 2:52 AM, Alex Crichton <notifications@github.com>wrote:

> In src/librustc/driver/driver.rs:
>
> > @@ -531,7 +541,13 @@ pub fn compile_input(sess: Session, cfg: ast::CrateConfig, input: &Input,
> >
> >          write_out_deps(sess, input, &outputs, &expanded_crate).unwrap();
> >
> > -        if stop_after_phase_2(sess) { return; }
> > +        if stop_after_phase_2(sess) {
> > +            if sess.opts.debugging_opts & session::AST_JSON != 0 {
> > +                let json = json::PrettyEncoder::str_encode(&expanded_crate);
> > +                io::println(json);
> > +            }
> > +            return;
> > +        }
>
> Couldn't you leave the modifications to stop_after_phase_X and then move
> the emission logic to the end of the phases themselves?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mozilla/rust/pull/12387/files#r9856752>
> .
>