Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub fn phase_1_parse_input(sess: &Session, cfg: ast::CrateConfig, input: &Input)
});

if sess.opts.debugging_opts & session::AST_JSON_NOEXPAND != 0 {
let mut stdout = io::stdout();
let mut stdout = io::BufferedWriter::new(io::stdout());
let mut json = json::PrettyEncoder::new(&mut stdout);
krate.encode(&mut json);
}
Expand Down Expand Up @@ -261,7 +261,7 @@ pub fn phase_2_configure_and_expand(sess: &Session,
front::assign_node_ids_and_map::assign_node_ids_and_map(sess, krate));

if sess.opts.debugging_opts & session::AST_JSON != 0 {
let mut stdout = io::stdout();
let mut stdout = io::BufferedWriter::new(io::stdout());
let mut json = json::PrettyEncoder::new(&mut stdout);
krate.encode(&mut json);
}
Expand Down