Skip to content

Commit 3550dc6

Browse files
Jose Narvaezgoyox86
Jose Narvaez
authored andcommitted
Manual fixups done.
1 parent f432be0 commit 3550dc6

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

src/librustc_driver/driver.rs

+16-16
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ pub fn compile_input(sess: Session,
165165
tcx.print_debug_stats();
166166
}
167167
// Discard interned strings as they are no longer required.
168-
token::get_ident_interner().clear();
168+
token::get_ident_interner().clear();
169169

170-
Ok((outputs, trans))
171-
})
170+
Ok((outputs, trans))
171+
})
172172
};
173173

174174
let (outputs, trans) = if let Ok(out) = result {
@@ -708,7 +708,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
708708
stability::Index::new(krate),
709709
|tcx| {
710710

711-
// passes are timed inside typeck
711+
// passes are timed inside typeck
712712
typeck::check_crate(tcx, trait_map);
713713

714714
time(time_passes,
@@ -722,7 +722,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
722722
external_exports)
723723
});
724724

725-
// Do not move this check past lint
725+
// Do not move this check past lint
726726
time(time_passes, "stability index", || {
727727
tcx.stability.borrow_mut().build(tcx, krate, &public_items)
728728
});
@@ -755,11 +755,11 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
755755
"rvalue checking",
756756
|| middle::check_rvalues::check_crate(tcx, krate));
757757

758-
// Avoid overwhelming user with errors if type checking failed.
759-
// I'm not sure how helpful this is, to be honest, but it avoids a
760-
// lot of annoying errors in the compile-fail tests (basically,
761-
// lint warnings and so on -- kindck used to do this abort, but
762-
// kindck is gone now). -nmatsakis
758+
// Avoid overwhelming user with errors if type checking failed.
759+
// I'm not sure how helpful this is, to be honest, but it avoids a
760+
// lot of annoying errors in the compile-fail tests (basically,
761+
// lint warnings and so on -- kindck used to do this abort, but
762+
// kindck is gone now). -nmatsakis
763763
tcx.sess.abort_if_errors();
764764

765765
let reachable_map =
@@ -787,7 +787,7 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
787787
"lint checking",
788788
|| lint::check_crate(tcx, krate, &exported_items));
789789

790-
// The above three passes generate errors w/o aborting
790+
// The above three passes generate errors w/o aborting
791791
tcx.sess.abort_if_errors();
792792

793793
f(tcx,
@@ -887,8 +887,8 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, id: &str) {
887887

888888
let result =
889889
(|| -> io::Result<()> {
890-
// Build a list of files used to compile the output and
891-
// write Makefile-compatible dependency rules
890+
// Build a list of files used to compile the output and
891+
// write Makefile-compatible dependency rules
892892
let files: Vec<String> = sess.codemap()
893893
.files
894894
.borrow()
@@ -902,9 +902,9 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, id: &str) {
902902
try!(write!(file, "{}: {}\n\n", path.display(), files.join(" ")));
903903
}
904904

905-
// Emit a fake target for each input file to the compilation. This
906-
// prevents `make` from spitting out an error if a file is later
907-
// deleted. For more info see #28735
905+
// Emit a fake target for each input file to the compilation. This
906+
// prevents `make` from spitting out an error if a file is later
907+
// deleted. For more info see #28735
908908
for path in files {
909909
try!(writeln!(file, "{}:", path));
910910
}

src/librustc_driver/lib.rs

+8-9
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ pub fn run_compiler<'a>(args: &[String], callbacks: &mut CompilerCalls<'a>) {
153153
pretty::pretty_print_input(sess, cfg, &input, ppm, opt_uii, ofile);
154154
return;
155155
}
156-
None => {/* continue */
156+
// continue
157+
None => {
157158
}
158159
}
159160

@@ -510,6 +511,7 @@ pub fn version(binary: &str, matches: &getopts::Matches) {
510511
}
511512
}
512513

514+
#[rustfmt_skip]
513515
fn usage(verbose: bool, include_unstable_options: bool) {
514516
let groups = if verbose {
515517
config::rustc_optgroups()
@@ -528,23 +530,20 @@ fn usage(verbose: bool, include_unstable_options: bool) {
528530
};
529531
println!("{}\nAdditional help:
530532
-C help Print codegen options
531-
-W help \
532-
Print 'lint' options and default settings
533-
-Z help Print internal \
534-
options for debugging rustc{}\n",
533+
-W help Print 'lint' options and default settings
534+
-Z help Print internal options for debugging rustc{}\n",
535535
getopts::usage(&message, &groups),
536536
extra_help);
537537
}
538538

539+
#[rustfmt_skip]
539540
fn describe_lints(lint_store: &lint::LintStore, loaded_plugins: bool) {
540541
println!("
541542
Available lint options:
542543
-W <foo> Warn about <foo>
543-
-A <foo> \
544-
Allow <foo>
544+
-A <foo> Allow <foo>
545545
-D <foo> Deny <foo>
546-
-F <foo> Forbid <foo> \
547-
(deny, and deny all overrides)
546+
-F <foo> Forbid <foo> deny, and deny all overrides)
548547
549548
");
550549

src/librustc_driver/pretty.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,7 @@ pub fn pretty_print_input(sess: Session,
789789
debug!("pretty printing flow graph for {:?}", opt_uii);
790790
let uii = opt_uii.unwrap_or_else(|| {
791791
sess.fatal(&format!("`pretty flowgraph=..` needs NodeId (int) or
792-
\
793-
unique path suffix (b::c::d)"))
792+
unique path suffix (b::c::d)"))
794793

795794
});
796795
let ast_map = ast_map.expect("--pretty flowgraph missing ast_map");

0 commit comments

Comments
 (0)