diff --git a/src/functions.rs b/src/functions.rs index 492754a39aaa..32ad65befe78 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -195,7 +195,7 @@ impl<'a> FmtVisitor<'a> { write_list(&arg_strs, &fmt) } - // Gets comments in between items of a list. + // Gets comments in between items of a list. fn make_comments_for_list(&self, prefix: Vec, mut it: I, @@ -228,7 +228,7 @@ impl<'a> FmtVisitor<'a> { // FIXME If you thought the crap with the commas was ugly, just wait. // This is awful. We're going to look from the last item span to the // start of the return type span, then we drop everything after the - // first closing paren. Obviously, this will break if there is a + // first closing paren. Obviously, this will break if there is a // closing paren in the comment. // The fix is comments in the AST or a span for the closing paren. let snippet = self.snippet(codemap::mk_sp(prev_end, next_span_start)); @@ -406,7 +406,7 @@ impl<'a> FmtVisitor<'a> { ast::FunctionRetTy::DefaultReturn(_) => String::new(), ast::FunctionRetTy::NoReturn(_) => "-> !".to_string(), ast::FunctionRetTy::Return(ref ty) => "-> ".to_string() + &pprust::ty_to_string(ty), - } + } } // TODO we farm this out, but this could spill over the column limit, so we ought to handle it properly diff --git a/src/mod.rs b/src/mod.rs index 21db1e902bbc..71ce9120fe1f 100644 --- a/src/mod.rs +++ b/src/mod.rs @@ -255,13 +255,13 @@ impl<'a> CompilerCalls<'a> for RustFmtCalls { fn run(args: Vec, write_mode: WriteMode) { let mut call_ctxt = RustFmtCalls { input_path: None, write_mode: write_mode }; - rustc_driver::run_compiler(&args, &mut call_ctxt); + rustc_driver::run_compiler(&args, &mut call_ctxt); } fn main() { let args: Vec<_> = std::env::args().collect(); - //run(args, WriteMode::Display); - run(args, WriteMode::NewFile("new")); + run(args, WriteMode::Display); + //run(args, WriteMode::NewFile("new")); std::env::set_exit_status(0); // TODO unit tests